/*! Build 4.1.3 at Fri Jul 03 2020 14:33:04 GMT+0000 (Coordinated Universal Time) for live */ !function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t():"function"===typeof define&&define.amd?define([],t):"object"===typeof exports?exports["js/NotificationsMain"]=t():e["js/NotificationsMain"]=t()}(window,(function(){return function(e){function t(t){for(var n,i,o=t[0],a=t[1],s=0,u=[];s=0||(n.push(e),t.push(e.id))})),n}},{key:"filterData",value:function(e){var t=this,n=a.a.get(),r=n.preferences.productsEnabled.filter((function(e){return e.enabled})).map((function(e){return e.product}));return this.topics=n.subscriptions.filter((function(e){return e.enabled})),this.topicKeys=this.topics.map((function(e){return e.topic})),e.filter((function(e){return r.includes(e.product)&&e.topic.some((function(n){if(t.topicKeys&&t.topicKeys.includes(n)){var r=c(t.topics,(function(e){return e.topic===n}));if(r&&new Date(e.creationTimestamp)>new Date(r.lastSubscribed))return!0}return!1}))}))}},{key:"loadData",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"latest.json",n="https:".concat(f.env.feedBaseUrl).concat(e,"/").concat(t),r=new Date;return u(n,{},"latest.json"!==t).catch((function(e){throw e})).then((function(e){var t=[];if(!e)return{list:t,next:null,reachedEnd:!0};var n=!1;e.notifications&&e.notifications.forEach((function(e){var i=new Date(e.creationTimestamp),o=Math.abs(r.getTime()-i.getTime()),a=Math.floor(o/864e5);a>=f.env.maxNotificationAge&&(n=!0,a>f.env.maxNotificationAge)||t.push(e)}));var i=e.next&&"false"!==e.next?e.next:null;return{list:t,next:i,reachedEnd:n}}))}}])&&s(t.prototype,n),r&&s(t,r),e}();function d(e){return(d="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:e?this.NEXT_DISPLAY_PAGE:"latest.json",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return _(g(t.prototype),"loadData",this).call(this,"aggregated",r).then((function(r){var o=r.list,a=r.next,s=r.reachedEnd;if(!o)return{data:[],reachedEnd:s};a||(s=!0);var c=i.concat(o),u=_(g(t.prototype),"filterData",n).call(n,c),f=_(g(t.prototype),"dedupeData",n).call(n,u);return s?((!n.NEXT_DISPLAY_PAGE||e&&!s&&a)&&(n.NEXT_DISPLAY_PAGE=a),{data:f,reachedEnd:s}):n.fetch(e,a,f)}))}}])&&h(n.prototype,r),i&&h(n,i),t}(l);function E(e){return(E="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function m(e,t){for(var n=0;nP?new y:new R;var n=a.a.get();if(n.preferences)this.lastRead=new Date(n.preferences.lastRead),A.a.override(n.preferences.readFilter);else{var r=new Date;r.setDate(r.getDate()-5),this.lastRead=r}}var t,n,r;return t=e,(n=[{key:"populateReadStatus",value:function(e){var t=this;return e.forEach((function(e){A.a.contains(e.id)?e.status=null:new Date(t.lastRead)0&&void 0!==arguments[0]&&arguments[0];return this.modelInterface.fetch(t).then((function(n){var r=n.data,i=n.reachedEnd;r.sort((function(e,t){return new Date(e.creationTimestamp)>=new Date(t.creationTimestamp)?1:-1}));var o=e.populateReadStatus(r);return(t?o.reverse():o).forEach((function(n){w(e.notifications,(function(e){return e.id===n.id}))||e.notifications[t?"push":"unshift"](n)})),{notifications:e.modelInterface.filterData(e.notifications),reachedEnd:i}}))}}])&&S(t.prototype,n),r&&S(t,r),e}(),L=n("cc6e3beeba09f932110c"),x=n("63f466675e26206f7fb1"),C=n("5393f737c885af4ba6bc"),D=n("0cf9e3bf58c29c26a188");function j(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}new(n("05554638dfd99ad17c5b"));var k=n("cee82cc6e0aa2ec436fd");t.default=Object(o.withOptimizely)((function(e,t){var n,o=j(Object(D.a)(),2),s=o[0],c=o[1],u=e.orbit,f=e.basePath,l=e.drawerContent,d=e.i18n,p=e.optimizely,h=s.drawerState,b=s.notifications,_=s.stateData,g=s.reloadUserState,v=new L.b;Object(i.useEffect)((function(){c.setOrbit(u),u.refresh(),c.setI18n(d),c.setBasePath(f),c.setUserPreferencesModel(a.a),c.setNavNotificationElement(document.querySelector(".js-notification-link")),c.setOptimizely(p)}),[]),Object(i.useEffect)((function(){u.addDrawer("notifications",document.querySelector(".js-notification-link"),l,(function(e){c.setDrawerState(e)}))}),[]),Object(i.useEffect)((function(){if(_&&"hidden"===h&&k.log("Bell",{STA:"close",ONB:!!_.onboarded,SIG:!!_.signedIn}),"hidden"===h)n&&n.markAllAsSeen();else{if(!_)return;if(!1===_.signedIn||(a.a.updateRead(!0),k.logNewNotifications(b,h)),_.policyIssue)k.logClick("Bell",{STA:"load-u13",ONB:!1,SIG:!0});else{s.alert&&k.logClick("Bell",{STA:"ring",ONB:0!=s.subscriptions.length,SIG:!!_.signedIn});var e=s.products.every((function(e){return!e.enabled}))?"load-off":0===s.subscriptions.length?"load-onb":0==s.notifications.length?"load-empty":"load";k.logClick("Bell",{STA:e,ONB:0!=s.subscriptions.length,SIG:!!_.signedIn})}}c.removeBellAlert(),u.updateDrawerHeight("notifications"),u.refresh()}),[h]),Object(i.useEffect)((function(){m(),"undefined"!==typeof localStorage&&_&&_.signedIn&&localStorage.getItem("bbc-notifications-u13-pending-policy")&&(c.showU13Success(),localStorage.removeItem("bbc-notifications-u13-pending-policy"))}),[g]);var y,E,m=function(){v.load().then((function(e){if(e.idctaResponse?c.setIdctaLoaded(e):c.setStateData(e),!1===e.signedIn){var t=x.setMvtCookie();return p.user.id=t,void k.log("Bell",{STA:"load",ONB:!1,SIG:!1})}var r=x.get("ckns_sylphid");p.user.id=r,e.policyIssue?(c.setOnboardingU13View(),c.setBellAlert(),a.a.fetch(!1).then((function(t){return I(t,e)}))):e.policyIssue||(c.setHomeView(),a.a.fetch(!1,(function(){return c.showU13Success()})).then((function(t){n||(n=new U,T(),c.setFetchNotifications(T),c.setNotificationsModel(n),window.setInterval(T,C.env.notificationsPollingInterval),window.setInterval(O,C.env.preferencesPollingInterval),c.setProducts(a.a.get().preferences.productsEnabled,a.a.friendlyProductNames)),I(t,e)})))})).catch((function(e){c.setError()})).then((function(){}))},I=function(e,t){c.setSubscriptions(e.subscriptions),0===e.subscriptions.length&&"hidden"===s.drawerState&&e.preferences.productsEnabled.some((function(e){return e.enabled}))&&(c.setBellAlert(),k.log("Bell",{STA:"ring",ONB:0!=e.subscriptions.length&&!t.policyIssue,SIG:!0})),k.log("Bell",{STA:"load",ONB:0!=e.subscriptions.length&&!t.policyIssue,SIG:!0})},O=function(){a.a.fetch().catch((function(e){c.setError()})).then((function(e){c.setSubscriptions(e.subscriptions)})),c.setProducts(a.a.get().preferences.productsEnabled,a.a.friendlyProductNames)},T=function(e){e&&c.setLoadingMore();var t=b.length;return n.fetch(!1).catch((function(e){c.setError()})).then((function(e){if(e){var n=e.notifications,r=e.reachedEnd;c.setReachedEnd(r),c.setNotifications(n),c.removeLoadingMore();var i=!1;n.forEach((function(e){"new"===e.status&&(i=!0)})),i&&(k.logNewNotifications(n,u.getDrawerState("notifications")),n.length>t&&(c.setBellAlert(),k.log("Bell",{STA:"ring",ONB:!0,SIG:!0})))}}))};return Object(r.h)("bbc-notifications-bell",null,Object(r.h)("a",{name:"notificationLink",id:"notification-link",href:"#",className:(y="",E="",void 0===s||void 0===_||!0!==_.signedIn?E="notifications-grey-bell":_.signedIn&&(E="notifications-black-bell"),s.alert&&(y="swing"),"".concat("js-notification-link animated three notifications-shown"," ").concat(y," ").concat(E))},Object(r.h)("span",{className:"hidden-span",style:{height:"1px",width:"1px",position:"absolute",overflow:"hidden",top:"-10px"}},"Notifications"),Object(r.h)("div",{className:"notification-link--triangle"}),Object(r.h)("div",{className:"notification-link--triangle"}),Object(r.h)("span",{id:"not-num",className:void 0!==s&&!0===s.alert?"new-notifications":""}),Object(r.h)("span",{"aria-live":"polite",className:"notification-link__live notification-link__live--js"})))}))},"005aacb138868dc5c5e0":function(e,t,n){var r=n("913c9a6b08bfb314c887"),i=n("9c29dc7850f23c4744c5"),o=n("f9a21f1b550208419753"),a=i((function(e,t){r(t,o(t),e)}));e.exports=a},"00945206146f7a17044b":function(e,t,n){var r=n("5a7ccd6273ec77fdeabc"),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return i.call(t,e)?t[e]:void 0}},"0110081a582797d9710b":function(e,t,n){"use strict";var r=n("58364c04a33db8476261"),i=n.n(r);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var a=n("fbc36b60f8b4242470ae").default,s=new function e(){var t=this;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),o(this,"setLanguage",(function(e){t.language=e,t.translations=a(i.a,"$.".concat(t.language))[0]})),o(this,"getLanguage",(function(){return t.language})),o(this,"setFallBackLanguage",(function(e){t.fallBackLanguage=e,t.fallBackTranslations=a(i.a,t.fallBackLanguage)})),o(this,"t",(function(e){if(!e)return"";var n=a(t.translations?t.translations:t.fallBackTranslations,"$.".concat(e));if(!n)return e;for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o0?t.format(n,i):n})),o(this,"format",(function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r1&&void 0!==arguments[1]?arguments[1]:30,n=e.substring(0,t+1);return e.length>t?-1==n.indexOf(" ")?n.substring(0,n.length-1).trim()+"...":n.substr(0,Math.min(n.length,n.lastIndexOf(" "))).trim()+"...":e},each:function(e,t,n){if(n=n||null,this.isObject(e))for(var r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r)},bind:function(e,t){if("function"===typeof e)return e.bind?e.bind(t):function(){e.apply(t,arguments)}},isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},keys:function(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t},isObject:function(e){return"object"===n(e)&&null!==e}},e.exports=r},"089f6438d068e21c2e37":function(e,t){var n=Object.prototype.toString;e.exports=function(e){return n.call(e)}},"09efa73129bfb7951ff1":function(e,t,n){var r=n("43b923cfacc75860e178"),i=n("596dbf5a57be1d3c969c"),o=n("a7748d7c475f1fd90265");e.exports=function(e,t){return o(i(e,t,r),e+"")}},"0b205baa0fbd29b7f67c":function(e,t){var n="undefined"!==typeof ArrayBuffer;function r(e,t){var r;"number"!==typeof e&&(e=32*(r=e).length);var i=Math.ceil(e/32),o=-1;if(this.m=e=32*i,this.k=t,n){var a=1<>1&1431655765))+(e>>2&858993459))+(e>>4)&252645135)>>24}r.prototype.locations=function(e){for(var t=this.k,n=this.m,r=this._locations,i=function(e){var t,n,r=e.length,i=2166136261,o=-1;for(;++o>24,i+=(i<<1)+(i<<4)+(i<<7)+(i<<8)+(i<<24)),(n=16711680&t)&&(i^=n>>16,i+=(i<<1)+(i<<4)+(i<<7)+(i<<8)+(i<<24)),(n=65280&t)&&(i^=n>>8,i+=(i<<1)+(i<<4)+(i<<7)+(i<<8)+(i<<24)),i^=255&t,i+=(i<<1)+(i<<4)+(i<<7)+(i<<8)+(i<<24);return i+=i<<13,i^=i>>7,i+=i<<3,i^=i>>17,4294967295&(i+=i<<5)}(e),o=function(e){return e+=(e<<1)+(e<<4)+(e<<7)+(e<<8)+(e<<24),e+=e<<13,e^=e>>7,e+=e<<3,e^=e>>17,4294967295&(e+=e<<5)}(i),a=-1,s=i%n;++a1?n-1:0),i=1;i1)for(var n=1;n-1||(f.indexOf("SamsungBrowser")>-1||(f.indexOf("Opera")>-1||f.indexOf("OPR")>-1||(f.indexOf("Trident")>-1?("Microsoft Internet Explorer",c.push(Promise.all([n.e(1),n.e(5)]).then(n.t.bind(null,"5b15df55c1316f23e9d0",7))),c.push(Promise.all([n.e(1),n.e(3)]).then(n.t.bind(null,"9597d46c747ee669114f",7)))):f.indexOf("Edge")>-1||(f.indexOf("Chrome")>-1||f.indexOf("Safari"))))),Promise.all(c).then((function(c){!function(e,t){Object(a.setLogger)(null),window.require(["orb/nav","idcta/id-config"],(function(c,f){!function(e,t){"function"===typeof e.getInstance?e.getInstance():e;t}(e,f);var l=document.getElementById("mybbc-wrapper");!function(e,t){if(e){t.removeChild(e);var n=document.createElement("bbc-notifications");n.id="bbc-notifications",t.appendChild(n)}}(document.getElementById("notification-link"),l);var d=n("63f466675e26206f7fb1"),p=d.get("ckps_kl_lang");void 0===p&&(p=d.get("ckps_language")),void 0===p&&(p="en"),p.endsWith("-GB")||(p="".concat(p,"-GB")),(p.startsWith("en")||p.startsWith("cy")||p.startsWith("ga")||p.startsWith("gd"))&&s.a.setLanguage(p),s.a.setFallBackLanguage("en-GB"),(r=document.createElement("div")).className="orb-panel",r.id="orb-panel";var h=n("00404b0cf57e6ab60c97").default,b=Object(a.createInstance)({sdkKey:u.a.env.optimizely_sdk_key,datafileOptions:{updateInterval:u.a.env.optimizely_poll_interval,autoUpdate:!0,urlTemplate:"https://cdn.optimizely.com/datafiles/%s.json"}}),_=d.setMvtCookie();Object(o.render)(Object(o.h)(a.OptimizelyProvider,{optimizely:b,user:{id:_}},Object(o.h)(h,{orbit:c,basePath:t,drawerContent:r,i18n:s.a})),document.getElementById("bbc-notifications")),c.refresh(),i=n("b96e824c2cbcd9fb72c7").default,Object(o.render)(Object(o.h)(a.OptimizelyProvider,{optimizely:b,user:{id:_}},Object(o.h)(i,{orbit:c,i18n:s.a,basePath:t})),r)}))}(e,t)})).catch((function(e){}))}},"2da8456225be17b38fb7":function(e,t){var n=Date.now;e.exports=function(e){var t=0,r=0;return function(){var i=n(),o=16-(i-r);if(r=i,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}},"2edffdb59d944a16537a":function(e,t,n){"use strict";e.exports=function(e,t,n){if("function"===typeof Array.prototype.find)return e.find(t,n);n=n||this;var r,i=e.length;if("function"!==typeof t)throw new TypeError(t+" is not a function");for(r=0;r=200&&e<400}var d=function(){function e(e){var t=this,n=r({},this.getConfigDefaults(),e),i=n.datafile,o=n.autoUpdate,l=void 0!==o&&o,d=n.sdkKey,p=n.updateInterval,h=void 0===p?c.DEFAULT_UPDATE_INTERVAL:p,b=n.urlTemplate,_=void 0===b?c.DEFAULT_URL_TEMPLATE:b;this.isReadyPromiseSettled=!1,this.readyPromiseResolver=function(){},this.readyPromiseRejecter=function(){},this.readyPromise=new Promise((function(e,n){t.readyPromiseResolver=e,t.readyPromiseRejecter=n})),i?(this.currentDatafile=i,this.resolveReadyPromise()):this.currentDatafile=null,this.isStarted=!1,this.datafileUrl=a.sprintf(_,d),this.emitter=new s.default,this.autoUpdate=l,!function(e){return e>=c.MIN_UPDATE_INTERVAL}(h)?(f.warn("Invalid updateInterval %s, defaulting to %s",h,c.DEFAULT_UPDATE_INTERVAL),this.updateInterval=c.DEFAULT_UPDATE_INTERVAL):this.updateInterval=h,this.currentTimeout=null,this.currentRequest=null,this.backoffController=new u.default,this.syncOnCurrentRequestComplete=!1}return e.prototype.get=function(){return this.currentDatafile},e.prototype.start=function(){this.isStarted||(f.debug("Datafile manager started"),this.isStarted=!0,this.backoffController.reset(),this.syncDatafile())},e.prototype.stop=function(){return f.debug("Datafile manager stopped"),this.isStarted=!1,this.currentTimeout&&(clearTimeout(this.currentTimeout),this.currentTimeout=null),this.emitter.removeAllListeners(),this.currentRequest&&(this.currentRequest.abort(),this.currentRequest=null),Promise.resolve()},e.prototype.onReady=function(){return this.readyPromise},e.prototype.on=function(e,t){return this.emitter.on(e,t)},e.prototype.onRequestRejected=function(e){this.isStarted&&(this.backoffController.countError(),e instanceof Error?f.error("Error fetching datafile: %s",e.message,e):"string"===typeof e?f.error("Error fetching datafile: %s",e):f.error("Error fetching datafile"))},e.prototype.onRequestResolved=function(e){if(this.isStarted){"undefined"!==typeof e.statusCode&&l(e.statusCode)?this.backoffController.reset():this.backoffController.countError(),this.trySavingLastModified(e.headers);var t=this.getNextDatafileFromResponse(e);if(null!==t)if(f.info("Updating datafile from response"),this.currentDatafile=t,this.isReadyPromiseSettled){var n={datafile:t};this.emitter.emit("update",n)}else this.resolveReadyPromise()}},e.prototype.onRequestComplete=function(){this.isStarted&&(this.currentRequest=null,this.isReadyPromiseSettled||this.autoUpdate||this.rejectReadyPromise(new Error("Failed to become ready")),this.autoUpdate&&this.syncOnCurrentRequestComplete&&this.syncDatafile(),this.syncOnCurrentRequestComplete=!1)},e.prototype.syncDatafile=function(){var e=this,t={};this.lastResponseLastModified&&(t["if-modified-since"]=this.lastResponseLastModified),f.debug("Making datafile request to url %s with headers: %s",this.datafileUrl,(function(){return JSON.stringify(t)})),this.currentRequest=this.makeGetRequest(this.datafileUrl,t);var n=function(){e.onRequestComplete()};this.currentRequest.responsePromise.then((function(t){e.onRequestResolved(t)}),(function(t){e.onRequestRejected(t)})).then(n,n),this.autoUpdate&&this.scheduleNextUpdate()},e.prototype.resolveReadyPromise=function(){this.readyPromiseResolver(),this.isReadyPromiseSettled=!0},e.prototype.rejectReadyPromise=function(e){this.readyPromiseRejecter(e),this.isReadyPromiseSettled=!0},e.prototype.scheduleNextUpdate=function(){var e=this,t=this.backoffController.getDelay(),n=Math.max(t,this.updateInterval);f.debug("Scheduling sync in %s ms",n),this.currentTimeout=setTimeout((function(){e.currentRequest?e.syncOnCurrentRequestComplete=!0:e.syncDatafile()}),n)},e.prototype.getNextDatafileFromResponse=function(e){return f.debug("Response status code: %s",e.statusCode),"undefined"===typeof e.statusCode?null:304===e.statusCode?null:l(e.statusCode)?this.tryParsingBodyAsJSON(e.body):null},e.prototype.tryParsingBodyAsJSON=function(e){var t;try{t=JSON.parse(e)}catch(e){return f.error("Error parsing response body: %s",e.message,e),null}var n=null;return"object"===typeof t&&null!==t?n=t:f.error("Error parsing response body: was not an object"),n},e.prototype.trySavingLastModified=function(e){var t=e["last-modified"]||e["Last-Modified"];"undefined"!==typeof t&&(this.lastResponseLastModified=t,f.debug("Saved last modified header value from response: %s",this.lastResponseLastModified))},e}();t.default=d},"31756934c80df8e12080":function(e,t,n){var r=n("ebb7be79b6c15709c3d5"),i=n("c9327538105d995811b8");e.exports=function(e,t){var n=-1,o=i(e)?Array(e.length):[];return r(e,(function(e,r,i){o[++n]=t(e,r,i)})),o}},"3184612d9da4f8324390":function(e,t,n){var r=n("883c01ec557fc8a5e1b1");function i(){}i.prototype.log=function(){},e.exports={createLogger:function(e){return new r.ConsoleLogHandler(e)},createNoOpLogger:function(){return new i}}},"31bb4f2f1a4f1df15bdf":function(e,t){e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n-1&&this.__updateListeners.splice(t,1)}.bind(this)},p.prototype.stop=function(){this.datafileManager&&this.datafileManager.stop(),this.__updateListeners=[]},e.exports={ProjectConfigManager:p}},"36648780162654e4ac23":function(e,t,n){var r=n("c161013742249fbd15d0");e.exports=function(e,t){var n=r(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this}},"36f73ad867388d6d2c45":function(e,t,n){var r=n("04fddb994f93fcfa2bf7"),i=n("fc559c1db6037f379144"),o=n("8471fa3e948e6f8d4661"),a=n("df7b55382888b4ee215c"),s=n("937a9da8fad2c0a50a05"),c=n("3d7ccc0ee3004e3194a3"),u=n("8637e970b1e5cbf2ab1c"),f=n("c7c63798d80f6c943171"),l=n("7798bfb91dfe96872a60"),d=n("ed435abeaba8ecaa0649"),p=n("971268c5be9618ca3262").sprintf,h=n("8b38e41091cf0d06e57b"),b=n("e3aa348ea6f439469583"),_=n("3494807191f1420db31a"),g=a.ERROR_MESSAGES,v=a.LOG_LEVEL,y=a.LOG_MESSAGES,E=a.DECISION_SOURCES,m=a.FEATURE_VARIABLE_TYPES,I=a.DECISION_NOTIFICATION_TYPES,O=a.NOTIFICATION_TYPES;function T(e){var t=e.clientEngine;-1===a.VALID_CLIENT_ENGINES.indexOf(t)&&(e.logger.log(v.INFO,p(y.INVALID_CLIENT_ENGINE,"OPTIMIZELY",t)),t=a.NODE_CLIENT_ENGINE),this.clientEngine=t,this.clientVersion=e.clientVersion||a.NODE_CLIENT_VERSION,this.errorHandler=e.errorHandler,this.eventDispatcher=e.eventDispatcher,this.__isOptimizelyConfigValid=e.isValidInstance,this.logger=e.logger,this.projectConfigManager=new _.ProjectConfigManager({datafile:e.datafile,datafileOptions:e.datafileOptions,jsonSchemaValidator:e.jsonSchemaValidator,sdkKey:e.sdkKey,skipJSONValidation:e.skipJSONValidation}),this.__disposeOnUpdate=this.projectConfigManager.onUpdate(function(e){this.logger.log(v.INFO,p(y.UPDATED_OPTIMIZELY_CONFIG,"OPTIMIZELY",e.revision,e.projectId)),this.notificationCenter.sendNotifications(O.OPTIMIZELY_CONFIG_UPDATE)}.bind(this)),this.__readyPromise=this.projectConfigManager.onReady();var n=null;if(e.userProfileService)try{h.validate(e.userProfileService)&&(n=e.userProfileService,this.logger.log(v.INFO,p(y.VALID_USER_PROFILE_SERVICE,"OPTIMIZELY")))}catch(e){this.logger.log(v.WARNING,e.message)}this.decisionService=o.createDecisionService({userProfileService:n,logger:this.logger,UNSTABLE_conditionEvaluators:e.UNSTABLE_conditionEvaluators}),this.notificationCenter=l.createNotificationCenter({logger:this.logger,errorHandler:this.errorHandler}),this.eventProcessor=new u.LogTierV1EventProcessor({dispatcher:this.eventDispatcher,flushInterval:e.eventFlushInterval,maxQueueSize:e.eventBatchSize,notificationCenter:this.notificationCenter}),this.eventProcessor.start(),this.__readyTimeouts={},this.__nextReadyTimeoutId=0}T.prototype.__isValidInstance=function(){return this.__isOptimizelyConfigValid&&this.projectConfigManager.getConfig()},T.prototype.activate=function(e,t,n){try{if(!this.__isValidInstance())return this.logger.log(v.ERROR,p(y.INVALID_OBJECT,"OPTIMIZELY","activate")),null;if(!this.__validateInputs({experiment_key:e,user_id:t},n))return this.__notActivatingExperiment(e,t);var r=this.projectConfigManager.getConfig();if(!r)return null;try{var i=this.getVariation(e,t,n);if(null===i)return this.__notActivatingExperiment(e,t);if(!d.isRunning(r,e)){var o=p(y.SHOULD_NOT_DISPATCH_ACTIVATE,"OPTIMIZELY",e);return this.logger.log(v.DEBUG,o),i}return this._sendImpressionEvent(e,i,t,n),i}catch(n){this.logger.log(v.ERROR,n.message);var a=p(y.NOT_ACTIVATING_USER,"OPTIMIZELY",t,e);return this.logger.log(v.INFO,a),this.errorHandler.handleError(n),null}}catch(e){return this.logger.log(v.ERROR,e.message),this.errorHandler.handleError(e),null}},T.prototype._sendImpressionEvent=function(e,t,n,r){var i=this.projectConfigManager.getConfig();if(i){var o=c.buildImpressionEvent({experimentKey:e,variationKey:t,userId:n,userAttributes:r,clientEngine:this.clientEngine,clientVersion:this.clientVersion,configObj:i});this.eventProcessor.process(o),this.__emitNotificationCenterActivate(e,t,n,r)}},T.prototype.__emitNotificationCenterActivate=function(e,t,n,r){var i=this.projectConfigManager.getConfig();if(i){var o,a=d.getVariationIdFromExperimentAndVariationKey(i,e,t),c=d.getExperimentId(i,e),u={attributes:r,clientEngine:this.clientEngine,clientVersion:this.clientVersion,configObj:i,experimentId:c,userId:n,variationId:a,logger:this.logger},f=s.getImpressionEvent(u),l=i.experimentKeyMap[e];l&&l.variationKeyMap&&(o=l.variationKeyMap[t]),this.notificationCenter.sendNotifications(O.ACTIVATE,{experiment:l,userId:n,attributes:r,variation:o,logEvent:f})}},T.prototype.track=function(e,t,n,r){try{if(!this.__isValidInstance())return void this.logger.log(v.ERROR,p(y.INVALID_OBJECT,"OPTIMIZELY","track"));if(!this.__validateInputs({user_id:t,event_key:e},n,r))return;var i=this.projectConfigManager.getConfig();if(!i)return;if(!d.eventWithKeyExists(i,e))throw new Error(p(g.INVALID_EVENT_KEY,"OPTIMIZELY",e));r=this.__filterEmptyValues(r);var o=c.buildConversionEvent({eventKey:e,eventTags:r,userId:t,userAttributes:n,clientEngine:this.clientEngine,clientVersion:this.clientVersion,configObj:i});this.logger.log(v.INFO,p(a.LOG_MESSAGES.TRACK_EVENT,"OPTIMIZELY",e,t)),this.eventProcessor.process(o),this.__emitNotificationCenterTrack(e,t,n,r)}catch(e){this.logger.log(v.ERROR,e.message),this.errorHandler.handleError(e);var s=p(y.NOT_TRACKING_USER,"OPTIMIZELY",t);this.logger.log(v.INFO,s)}},T.prototype.__emitNotificationCenterTrack=function(e,t,n,r){try{var i=this.projectConfigManager.getConfig();if(!i)return;var o={attributes:n,clientEngine:this.clientEngine,clientVersion:this.clientVersion,configObj:i,eventKey:e,eventTags:r,logger:this.logger,userId:t},a=s.getConversionEvent(o);this.notificationCenter.sendNotifications(O.TRACK,{eventKey:e,userId:t,attributes:n,eventTags:r,logEvent:a})}catch(e){this.logger.log(v.ERROR,e.message),this.errorHandler.handleError(e)}},T.prototype.getVariation=function(e,t,n){try{if(!this.__isValidInstance())return this.logger.log(v.ERROR,p(y.INVALID_OBJECT,"OPTIMIZELY","getVariation")),null;try{if(!this.__validateInputs({experiment_key:e,user_id:t},n))return null;var i=this.projectConfigManager.getConfig();if(!i)return null;var o=i.experimentKeyMap[e];if(r.isEmpty(o))return this.logger.log(v.DEBUG,p(g.INVALID_EXPERIMENT_KEY,"OPTIMIZELY",e)),null;var a=this.decisionService.getVariation(i,e,t,n),s=d.isFeatureExperiment(i,o.id)?I.FEATURE_TEST:I.AB_TEST;return this.notificationCenter.sendNotifications(O.DECISION,{type:s,userId:t,attributes:n||{},decisionInfo:{experimentKey:e,variationKey:a}}),a}catch(e){return this.logger.log(v.ERROR,e.message),this.errorHandler.handleError(e),null}}catch(e){return this.logger.log(v.ERROR,e.message),this.errorHandler.handleError(e),null}},T.prototype.setForcedVariation=function(e,t,n){if(!this.__validateInputs({experiment_key:e,user_id:t}))return!1;var r=this.projectConfigManager.getConfig();if(!r)return!1;try{return this.decisionService.setForcedVariation(r,e,t,n)}catch(e){return this.logger.log(v.ERROR,e.message),this.errorHandler.handleError(e),!1}},T.prototype.getForcedVariation=function(e,t){if(!this.__validateInputs({experiment_key:e,user_id:t}))return null;var n=this.projectConfigManager.getConfig();if(!n)return null;try{return this.decisionService.getForcedVariation(n,e,t)}catch(e){return this.logger.log(v.ERROR,e.message),this.errorHandler.handleError(e),null}},T.prototype.__validateInputs=function(e,t,n){try{if(e.hasOwnProperty("user_id")){var r=e.user_id;if("string"!==typeof r||null===r||"undefined"===r)throw new Error(p(g.INVALID_INPUT_FORMAT,"OPTIMIZELY","user_id"));delete e.user_id}for(var o=Object.keys(e),a=0;a-1){var n=e.slice(0,t),i=e.slice(t+2);i.length>0&&(r[n]=i)}})),r}(n),t={statusCode:n.status,body:n.responseText,headers:e};o(t)}},n.timeout=r.REQUEST_TIMEOUT_MS,n.ontimeout=function(){i.error("Request timed out")},n.send()})),abort:function(){n.abort()}}}},"430760ce71a6876f481f":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_UPDATE_INTERVAL=3e5,t.MIN_UPDATE_INTERVAL=1e3,t.DEFAULT_URL_TEMPLATE="https://cdn.optimizely.com/datafiles/%s.json",t.BACKOFF_BASE_WAIT_SECONDS_BY_ERROR_COUNT=[0,8,16,32,64,128,256,512],t.REQUEST_TIMEOUT_MS=6e4},"430d8aae6ebaf5595c07":function(e,t,n){var r=n("44b7d0c5261c9879c084");e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}},"436f607eb5bb7e91dec1":function(e,t,n){var r=n("8bdd4315a9ab62a9788d"),i=n("9e7388381bfcbc4cb0c3");e.exports=function(e,t){return e&&r(e,i(t))}},"43b923cfacc75860e178":function(e,t){e.exports=function(e){return e}},"43dd891ba6876544e540":function(e,t,n){var r=n("4be2c15021f717a728f0")(n("18caba858d9ea0f67284"),"WeakMap");e.exports=r},"43e9e529a54d89a08995":function(e,t,n){var r=n("913c9a6b08bfb314c887"),i=n("4bfef6fdc48d634b8771");e.exports=function(e,t){return r(e,i(e),t)}},"44b7d0c5261c9879c084":function(e,t,n){var r=n("9b478f97cd46c0b02cbf");e.exports=function(e){var t=new e.constructor(e.byteLength);return new r(t).set(new r(e)),t}},"462d832399e590077545":function(e,t){e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},"46f6e25d4e9dbf2c81f3":function(e,t,n){var r=n("ad9f55ad5227816d53aa");e.exports=function(){this.__data__=new r,this.size=0}},"47e9e16a3e339321eec5":function(e,t){var n=Object.prototype;e.exports=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||n)}},"4b93c5a7bb60dd6ab0f4":function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e}},"4be2c15021f717a728f0":function(e,t,n){var r=n("65955717fc58c97d7378"),i=n("dba25a6f599687a5b44e");e.exports=function(e,t){var n=i(e,t);return r(n)?n:void 0}},"4bfef6fdc48d634b8771":function(e,t,n){var r=n("d5d7a5698f8c666b3a30"),i=n("a607943c6ce671e7106b"),o=n("6fbb5c3832d9bf525c40"),a=n("95959505b617e1839c43"),s=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)r(t,o(e)),e=i(e);return t}:a;e.exports=s},"4c2c765baf933e4dff2b":function(e,t,n){var r=n("4eeb3262288466030436");e.exports=function(e){return r(this.__data__,e)>-1}},"4eeb3262288466030436":function(e,t,n){var r=n("941955270fde8df3ace1");e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1}},"4eed1e36ccbbf199581d":function(e,t,n){var r=n("d8649c0763a95c2c417b"),i=n("462d832399e590077545"),o=n("00945206146f7a17044b"),a=n("2f73661a3b84f5a43e35"),s=n("c1377f34d08aad8c0b3f");function c(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t3;)n.pop()();if(n[1] your favourites",body:"Get notifications about your favourite programmes, music and more."},ok:"OK, I'm in",showMeMore:"Show me more",error:{somethingWentWrong:"Sorry, something has gone wrong.",hubDisplay:"There's been an error and your notifications
can't be displayed at the moment. Please try again later.",hubUpdate:"Sorry, something has gone wrong.
Your notifications could not be updated. Please try again later.",settingsDisplay:"There's been an error and your notifications settings
cannot be retrieved. Please try again later.",settingsUpdate:"Sorry, something has gone wrong.
Your settings could not be updated. Please try again later.",onboarding:"There's been an error and we are unable to get you
started with notifications. Please try again later."},under13:{moreInfo:"Find out more about child permissions",parentId:{title:"Want to hear about new stuff first?",body:"You need permission from a parent or guardian to get notifications.",button:"Ask for permission."},linkPending:{title:"You need permission from a parent or guardian to use notifications",body:"We've sent them an email that tells them what to do. Ask them to check their inbox and follow the steps. To send a new email, visit your BBC account settings."},permissionNotifications:{title:"You need permission from a parent or guardian to use notifications",body:"They can give permission by visiting the Child Permissions section in their BBC account settings."},done:"All done! You can now use your notifications."}}},"cy-GB":{disabled:{notificationsOff:"Hysbysiadau wedi diffodd",turnOnNotifications:"Trowch hysbysiadau ymlaen i gael gwybod am y sioeau a\u2019r dewisiadau diweddaraf."},settings:{allowNotifications:"Caniat\xe1u hysbysiadau",turnOffNotifications:"Gallwch ddiffodd yr holl hysbysiadau, neu dim ond rhai.",updates:"Y diweddaraf yn {0}"},emptyState:{nothingNew:"Dim byd newydd ar hyn o bryd",addMore:"Ychwanegwch ragor o\u2019ch hoff sioeau, a dewch yn \xf4l nes ymlaen.",exploreShows:"Rhagor o sioeau"},onboarding:{neverMissFavs:"Peidiwch \xe2 methu eich ffefrynnau",stayUpToDate:"Eich sioeau a dewisiadau diweddaraf i gyd mewn un lle.",addSubscribe:"Ychwanegwch, tanysgrifiwch neu arbedwch eich hoff bethau, a gadewch bopeth arall i ni."},Notifications:"Hysbysiadau","Notifications settings":"Gosodiadau'r Hysbysiadau",Settings:"Gosodiadau",Back:"N\xf4l","day ago":"dydd yn \xf4l","days ago":"o ddyddiau yn \xf4l","hour ago":"awr yn \xf4l","hours ago":"awr yn \xf4l","minute ago":"munud yn \xf4l","minutes ago":"o funudau yn \xf4l",Yesterday:"Ddoe","10 minutes ago":"10 munud yn \xf4l","Just now":"Eiliad yn \xf4l","{product} Notifications":"Gosodiadau {product}","Sign in":"Mewngofnodi",or:"neu",Register:"Gofrestru","You're in charge":"Yn eich dwylo chi","Visit your Settings any time to manage your notifications.":"Ewch i'ch Gosodiadau unrhyw bryd i reoli eich hysbysiadau.","Load More":"Llwytho mwy",Close:"Cau","Go to Next slide":"Mynd i'r sleid nesaf","Go to Previous slide":"Mynd i'r sleid flaenorol","Go to slide 1":"Mynd i sleid 1","Go to slide 2":"Mynd i sleid 2","Go to slide 3":"Mynd i sleid 3",copy:{noNotifications1:"Dim hysbysiadau ar hyn o bryd. Byddwn ni'n gadael i chi wybod pan mae rhywbeth gan eich hoff raglenni, artistiaid a rhestrau chwarae ar gael i chi.",noNotifications2:"Os ydy'ch hysbysiadau wedi eu diffodd, gallwch eu troi n\xf4l ymlaen. Ewch i'r gosodiadau.",upsell:{title:"Peidiwch \xe2 methu eich ffefrynnau",body:"Hysbysiadau am eich hoff rhaglenni, cerddoriaeth a mwy."},ok:"Iawn",showMeMore:"Dangos mwy",error:{somethingWentWrong:"Mae rhywbeth wedi mynd o'i le.",hubDisplay:"'Dyw hi ddim yn bosib dangos eich hysbysiadau ar hyn o bryd. Triwch eto nes ymlaen.",hubUpdate:"'Dyw eich hysbysiadau ddim yn gallu cael eu diweddaru. Triwch eto nes ymlaen.",settingsDisplay:"Mae yna broblem gyda'r gosodiadau ar hyn o bryd. Triwch eto nes ymlaen.",settingsUpdate:"'Dyw hi ddim yn bosib diweddaru eich gosodiadau. Triwch eto nes ymlaen.",onboarding:"'Dyw hi ddim yn bosib dechrau arni ar hyn o bryd. Triwch eto nes ymlaen."},under13:{moreInfo:"Dysgu mwy am ganiat\xe2d i blant",parentId:{title:"Eisiau clywed am bethau newydd gyntaf?",body:"Rwyt ti angen caniat\xe2d gan riant neu warchodwr i gael hysbysiadau.",button:"Gofynna am ganiat\xe2d."},linkPending:{title:"Rwyt ti angen caniat\xe2d rhiant neu warchodwr i ddefnyddio hysbysiadau",body:"Rydyn ni wedi anfon e-bost atyn nhw sy\u2019n egluro beth i\u2019w wneud. Maen nhw angen edrych yn eu mewnflwch a dilyn y cyfarwyddiadau. Er mwyn cael e-bost newydd, cer i osodiadau dy gyfrif BBC."},permissionNotifications:{title:"Rwyt ti angen caniat\xe2d rhiant neu warchodwr i ddefnyddio hysbysiadau",body:"Gallan nhw roi caniat\xe2d drwy fynd i adran Caniat\xe2d i Blant yng ngosodiadau eu cyfrif BBC."},done:"Barod! Nawr galli di ddefnyddio dy hysbysiadau."}}},"gd-GB":{disabled:{notificationsOff:"Tha fiosan dheth",turnOnNotifications:"Cuir fiosan air airson cumail suas ri pr\xf2graman \xf9ra agus taghaidhean."},settings:{allowNotifications:"Ceadaich fiosan",turnOffNotifications:"Faodar fiosan a chur dheth gu tur, no d\xecreach cuid de dh'fhiosan.",updates:"\xd9rachaidhean {0}"},emptyState:{nothingNew:"Chan eil dad \xf9r an-dr\xe0sta",addMore:"Feuch ri tuilleadh de na pr\xf2graman as fhe\xe0rr leat a chur ris, agus thoir s\xf9il a-rithist a dh'aithghearr.",exploreShows:"Thoir s\xf9il air pr\xf2graman eile"},onboarding:{neverMissFavs:"Na caill na pr\xf2graman as fhe\xe0rr leat",stayUpToDate:"C\xf9m suas ris na pr\xf2graman a chur thu ris agus taghaidhean eile.",addSubscribe:"Cuir ris, fo-sgr\xecobh, no s\xe0bhail na rudan as fhe\xe0rr leat, agus cumaidh sinne s\xf9il air a' ch\xf2rr."},Notifications:"Fiosan","Notifications settings":"Seataidhean Fiosa",Settings:"Seataidhean",Back:"Air ais","day ago":"latha air ais","days ago":"l\xe0ithean air ais","hour ago":"uair air ais","hours ago":"uairean air ais","minute ago":"mhionaid air ais","minutes ago":"mionaidean air ais",Yesterday:"An-d\xe8","10 minutes ago":"10 mionaidean air ais","Just now":"An-dr\xe0sta","{product} Notifications":"Fiosan {product}","Sign in":"Log a-steach",or:"no",Register:"Cl\xe0raich","You're in charge":"'S tusa a tha os cionn ch\xf9isean!","Visit your Settings any time to manage your notifications.":"Th\xe8id gu Seataidhean airson rian a chumail air d' fhiosan","Load More":"Faic tuilleadh",Close:"D\xf9in","Go to Next slide":"An ath slaighd","Go to Previous slide":"An slaighd roimhe","Go to slide 1":"Rach gu slaighd 1","Go to slide 2":"Rach gu slaighd 2","Go to slide 3":"Rach gu slaighd 3",copy:{noNotifications1:"Chan eil fiosan ann an-dr\xe0sta. Leigidh sinn fios nuair a bhios rudeigin ann bho na pr\xf2graman, luchd ci\xf9il is cl\xe0ran-ci\xf9il as fhe\xe0rr leat.",noNotifications2:"Ma tha d\u2019 fhiosan air an cur dheth, faodaidh tu an cur air a-rithist le bhith dol gu seataidhean.",upsell:{title:"Na caill na rudan as fhe\xe0rr leat",body:"Faigh fiosan mu na pr\xf2graman 's an ce\xf2l as fhe\xe0rr leat agus gu le\xf2r eile."},ok:"Ceart",showMeMore:"Seall tuilleadh",error:{somethingWentWrong:"Duilich, tha rudeigin air a dhol ce\xe0rr.",hubDisplay:"Chaidh rudeigin ce\xe0rr is chan urrainnear d\u2019 fhiosan a shealltainn an-dr\xe0sta. Feuch a-rithist.",hubUpdate:"Duilich, tha rudeigin air a dhol ce\xe0rr. Cha b\u2019 urrainnear d' fhiosan \xf9rachadh. Feuch a-rithist.",settingsDisplay:"Chaidh rudeigin ce\xe0rr is chan fhaighear do sheataidhean fiosa. Feuch a-rithist.",settingsUpdate:"Duilich, tha rudeigin air a dhol ce\xe0rr. Cha b\u2019 urrainnear do sheataidhean \xf9rachadh. Feuch a-rithist.",onboarding:"Chaidh rudeigin ce\xe0rr is chan fhaigh sinn air d\u2019 fhiosan a chur an s\xe0s. Feuch a-rithist."},under13:{moreInfo:"Faigh a-mach tuilleadh mu cheadan cloinne",parentId:{title:"Airson cluinntinn mu rudan \xf9ra an toiseach?",body:"Feumaidh tu cead bho ph\xe0rant no bho neach-c\xf9raim airson brathan fhaighinn.",button:"Iarr cead."},linkPending:{title:"Feumar cead fhaighinn bho ph\xe0rant no neach-c\xf9raim airson fiosan a chleachdadh",body:"Tha sinn air post-d a chur thuca le sti\xf9ireadh. Iarr orra s\xf9il a thoirt air na puist-d aca agus na ceumannan a' leantainn. Tadhal air seataidhean cunntais a' BhBC airson post-d a chur air falbh."},permissionNotifications:{title:"Feumar cead fhaighinn bho ph\xe0rant no neach-c\xf9raim airson fiosan a chleachdadh",body:"Faodaidh iadsan cead a thoirt le bhith tadhal air Ceadan Chloinne ann an seataidhean cunntais a' BhBC."},done:"D\xe8anta! Faodaidh tu na fiosan agad a chleachdadh."}}},"ga-GB":{disabled:{notificationsOff:"F\xf3gra\xed m\xfachta",turnOnNotifications:"Cuir f\xf3gra\xed ag dul le fanacht cothrom le d\xe1ta leis na cl\xe1ir a chuir t\xfa leis agus le roghanna scoth\xfala."},settings:{allowNotifications:"Ceadaigh f\xf3gra\xed",turnOffNotifications:"Thig leat na f\xf3gra\xed uilig a mh\xfachadh, n\xf3 cuid acu.",updates:"Nuashonra\xed {0}"},emptyState:{nothingNew:"Tada \xfar faoi l\xe1thair",addMore:"Bain triail as n\xedos m\xf3 de na cl\xe1ir is ansa leat a chur leis, agus seice\xe1il ar ais linn sul i bhfad.",exploreShows:"Taisc\xe9al cl\xe1ir"},onboarding:{neverMissFavs:"N\xe1 caill do chean\xe1in in am ar bith",stayUpToDate:"Fan cothrom le d\xe1ta leis na cl\xe1ir a chuir t\xfa leis agus le roghanna scoth\xfala.",addSubscribe:"Cuir leis, cl\xe1raigh n\xf3 s\xe1bh\xe1il na ruda\xed is ansa leat agus f\xe1g gach rud eile f\xfainne. "},Notifications:"F\xf3gra\xed","Notifications settings":"Socruithe na bhF\xf3gra\xed",Settings:"Socruithe",Back:"Siar","day ago":"l\xe1 \xf3 shin","days ago":"l\xe1 \xf3 shin","hour ago":"uair \xf3 shin","hours ago":"uair \xf3 shin","minute ago":"n\xf3im\xe9ad \xf3 shin","minutes ago":"n\xf3im\xe9ad \xf3 shin",Yesterday:"Inn\xe9","10 minutes ago":"10 mbomaite \xf3 shin","Just now":"D\xedreach ansin","{product} Notifications":"F\xf3gra\xed {product}","Sign in":"S\xednigh isteach",or:"n\xf3",Register:"Cl\xe1raigh","You're in charge":"T\xe1 t\xfa i gceannas!","Visit your Settings any time to manage your notifications.":"Tabhair cuairt ar do chuid Socruithe le go dtig leat smacht a choinne\xe1il orthu.","Load More":"L\xf3d\xe1il tuilleadh",Close:"Druid","Go to Next slide":"T\xe9igh go c\xe9ad sleamhn\xe1n eile","Go to Previous slide":"T\xe9igh go sleamhn\xe1n roimhe","Go to slide 1":"T\xe9igh go sleamhn\xe1n 1","Go to slide 2":"T\xe9igh go sleamhn\xe1n 2","Go to slide 3":"T\xe9igh go sleamhn\xe1n 3",copy:{noNotifications1:"N\xedl f\xf3gra\xed ann faoi l\xe1thair. Beidh muid i dteagmh\xe1il leat m\xe1 bh\xedonn rud \xe9igin ar f\xe1il a bhaineann leis na cl\xe1ir, na ceolt\xf3ir\xed n\xf3 na seinnliosta\xed is ansa leat.",noNotifications2:"M\xe1 t\xe1 do chuid f\xf3gra\xed m\xfachta, thig leat iad a chur air ar\xeds. T\xe9igh go socruithe.",upsell:{title:"N\xe1 caill do chian\xe1in riamh",body:"Aimsigh f\xf3gra\xed faoi do chian\xe1in, do cheol agus n\xedos m\xf3."},ok:"Ceart go leor",showMeMore:"Taispe\xe1in a thuilleadh",error:{somethingWentWrong:"T\xe1 br\xf3n orainn, t\xe1 rud \xe9igin cearr.",hubDisplay:"T\xe1 rud \xe9igin cearr agus n\xed f\xe9idir do chuid f\xf3gra\xed a fheice\xe1il faoi l\xe1thair. Triail ar\xeds n\xedos moille, le do thoil.",hubUpdate:"T\xe1 br\xf3n orainn, t\xe1 rud \xe9igin cearr. N\xed f\xe9idir do chuid f\xf3gra\xed a uasd\xe1t\xfa. Triail ar\xeds n\xedos moille, le do thoil.",settingsDisplay:"T\xe1 fadhb le socruithe na bhf\xf3gra\xed s'agat agus n\xedl f\xe1il orthu. Triail ar\xeds n\xedos moille, le do thoil.",settingsUpdate:"T\xe1 br\xf3n orainn, t\xe1 rud \xe9igin cearr. N\xed f\xe9idir do chuid f\xf3gra\xed a uasd\xe1t\xfa. Triail ar\xeds n\xedos moille, le do thoil.",onboarding:"T\xe1 fadhb \xe9igin ann agus n\xed f\xe9idir do chuid f\xf3gra\xed a chur sa tsi\xfal. Triail ar\xeds n\xedos moille, le do thoil."},under13:{moreInfo:"Tuilleadh eolais ar cheadanna p\xe1ist\xed",parentId:{title:"Ar mhaith leat bheith ar an eolas faoin stuif \xfar ar dt\xfas?",body:"Beidh cead do thuismitheora n\xf3 do chaomhn\xf3ra de dh\xedth ort m\xe1s mian leat f\xf3gra\xed a fh\xe1il.",button:"Iarr cead."},linkPending:{title:"T\xe1 cead tuismitheora n\xf3 caomhn\xf3ra de dh\xedth ort le f\xf3gra\xed a \xfas\xe1id",body:"Sheol muid r\xedomhphost chucu a ins\xedonn d\xf3ibh cad \xe9 at\xe1 le d\xe9anamh. Iarr orthu a mbosca isteach a sheice\xe1il agus na c\xe9imeanna a lean\xfaint. Le r\xedomhphost \xfar a sheoladh, tabhair cuairt ar shocruithe do chuntais BBC."},permissionNotifications:{title:"T\xe1 cead tuismitheora n\xf3 caomhn\xf3ra de dh\xedth ort le f\xf3gra\xed a \xfas\xe1id",body:"Thig leo cead a thabhairt ach dul chuig Ceadanna P\xe1ist\xed i socruithe a c(h)untais BBC."},done:"D\xe9anta! Thig leat d\u2019fh\xf3gra\xed a \xfas\xe1id anois."}}}}},"596dbf5a57be1d3c969c":function(e,t,n){var r=n("64b04a93b2ad0294c239"),i=Math.max;e.exports=function(e,t,n){return t=i(void 0===t?e.length-1:t,0),function(){for(var o=arguments,a=-1,s=i(o.length-t,0),c=Array(s);++a"),g=function(e){function t(t){var n=e.call(this,t)||this,r=t.optimizely,i=t.userId,o=t.userAttributes,a=t.user,s=null;return a?"then"in a?a.then((function(e){r.setUser(e)})):s={id:a.id,attributes:a.attributes||{}}:i&&(s={id:i,attributes:o||{}},_.warn("Passing userId and userAttributes as props is deprecated, please switch to using `user` prop")),s&&r.setUser(s),n}return h(t,e),t.prototype.componentDidUpdate=function(e){if(!e.isServerSide){var t=this.props.optimizely;this.props.user&&"id"in this.props.user&&(t.user.id&&function(e,t){if(e.id!==t.id)return!1;var n=Object.keys(e.attributes),r=Object.keys(t.attributes);if(n.sort(),r.sort(),!(n.length===r.length))return!1;for(var i=0;i-1&&t.onUserUpdateHandlers.splice(n,1)}},e.prototype.activate=function(e,t,n){var r=this.getUserContextWithOverrides(t,n);return null===r.id?(y.info('Not activating experiment "%s" because userId is not set',e),null):this._client.activate(e,r.id,r.attributes)},e.prototype.getVariation=function(e,t,n){var r=this.getUserContextWithOverrides(t,n);return null===r.id?(y.info('getVariation returned null for experiment "%s" because userId is not set',e),null):this._client.getVariation(e,r.id,r.attributes)},e.prototype.track=function(e,t,n,r){"undefined"!==typeof t&&"string"!==typeof t&&(r=t,t=void 0,n=void 0);var i=this.getUserContextWithOverrides(t,n);if(null!==i.id)return this._client.track(e,i.id,i.attributes,r);y.info('track for event "%s" not being sent because userId is not set',e)},e.prototype.isFeatureEnabled=function(e,t,n){var r=this.getUserContextWithOverrides(t,n);return null===r.id?(y.info('isFeatureEnabled returning false for feature "%s" because userId is not set',e),!1):this._client.isFeatureEnabled(e,r.id,r.attributes)},e.prototype.getFeatureVariables=function(e,t,n){var r=this,i=this.getUserContextWithOverrides(t,n),o=i.id;if(null===o)return y.info('getFeatureVariables returning `{}` for feature "%s" because userId is not set',e),{};var a=i.attributes,s={},c=this._client.projectConfigManager.getConfig();if(!c)return{};var u=c.featureKeyMap[e];return u?(u.variables.forEach((function(t){var n=t.type,i=t.key;switch(n){case"string":s[i]=r._client.getFeatureVariableString(e,i,o,a);break;case"boolean":s[i]=r._client.getFeatureVariableBoolean(e,i,o,a);break;case"integer":s[i]=r._client.getFeatureVariableInteger(e,i,o,a);break;case"double":s[i]=r._client.getFeatureVariableDouble(e,i,o,a)}})),s):{}},e.prototype.getFeatureVariableString=function(e,t,n,r){var i=this.getUserContextWithOverrides(n,r);return null===i.id?null:this._client.getFeatureVariableString(e,t,i.id,i.attributes)},e.prototype.getFeatureVariableBoolean=function(e,t,n,r){var i=this.getUserContextWithOverrides(n,r);return null===i.id?null:this._client.getFeatureVariableBoolean(e,t,i.id,i.attributes)},e.prototype.getFeatureVariableInteger=function(e,t,n,r){var i=this.getUserContextWithOverrides(n,r);return null===i.id?null:this._client.getFeatureVariableInteger(e,t,i.id,i.attributes)},e.prototype.getFeatureVariableDouble=function(e,t,n,r){var i=this.getUserContextWithOverrides(n,r);return null===i.id?null:this._client.getFeatureVariableDouble(e,t,i.id,i.attributes)},e.prototype.getEnabledFeatures=function(e,t){var n=this.getUserContextWithOverrides(e,t);return null===n.id?[]:this._client.getEnabledFeatures(n.id,n.attributes)},e.prototype.getForcedVariation=function(e,t){var n=this.getUserContextWithOverrides(t);return null===n.id?null:this._client.getForcedVariation(e,n.id)},e.prototype.setForcedVariation=function(e,t,n){var r=null,i=null;if(2===arguments.length)i=t,r=this.getUserContextWithOverrides().id;else if(3===arguments.length){if(r=this.getUserContextWithOverrides(t).id,void 0===n)return!1;i=n}return null!==r&&this._client.setForcedVariation(e,r,i)},e.prototype.close=function(){return this._client.close()},Object.defineProperty(e.prototype,"client",{get:function(){return this._client},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"notificationCenter",{get:function(){return this._client.notificationCenter},enumerable:!0,configurable:!0}),e.prototype.getUserContextWithOverrides=function(e,t){return{id:void 0===e?this.user.id:e,attributes:void 0===t?this.user.attributes:t}},e}();var m=o.getLogger(""),I=v(function(e){function t(t){var n=e.call(this,t)||this;n.autoUpdate=!1,n.unregisterUserListener=function(){};var r=t.autoUpdate,i=t.isServerSide,o=t.optimizely,a=t.feature;if(n.autoUpdate=!!r,i){if(null===o)throw new Error("optimizely prop must be supplied");var s=o.isFeatureEnabled(a),c=o.getFeatureVariables(a);n.state={canRender:!0,isEnabled:s,variables:c}}else n.state={canRender:!1,isEnabled:!1,variables:{}};return n}return h(t,e),t.prototype.componentDidMount=function(){var e=this,t=this.props,n=t.feature,r=t.optimizely,i=t.optimizelyReadyTimeout,o=t.isServerSide,a=t.timeout;if(null===r)throw new Error("optimizely prop must be supplied");if(!o){var s=void 0!==a?a:i;r.onReady({timeout:s}).then((function(t){t.success?m.info('feature="%s" successfully rendered for user="%s"',n,r.user.id):m.info('feature="%s" could not be checked before timeout of %sms, reason="%s" ',n,void 0===a?5e3:a,t.reason||"");var i=r.isFeatureEnabled(n),o=r.getFeatureVariables(n);e.setState({canRender:!0,isEnabled:i,variables:o}),e.autoUpdate&&e.setupAutoUpdateListeners()}))}},t.prototype.setupAutoUpdateListeners=function(){var e=this,t=this.props,n=t.optimizely,r=t.feature;null!==n&&(this.optimizelyNotificationId=n.notificationCenter.addNotificationListener("OPTIMIZELY_CONFIG_UPDATE",(function(){m.info('OPTIMIZELY_CONFIG_UPDATE, re-evaluating feature="%s" for user="%s"',r,n.user.id);var t=n.isFeatureEnabled(r),i=n.getFeatureVariables(r);e.setState({isEnabled:t,variables:i})})),this.unregisterUserListener=n.onUserUpdate((function(){m.info('User update, re-evaluating feature="%s" for user="%s"',r,n.user.id);var t=n.isFeatureEnabled(r),i=n.getFeatureVariables(r);e.setState({isEnabled:t,variables:i})})))},t.prototype.componentWillUnmount=function(){var e=this.props,t=e.optimizely;!e.isServerSide&&this.autoUpdate&&(t&&this.optimizelyNotificationId&&t.notificationCenter.removeNotificationListener(this.optimizelyNotificationId),this.unregisterUserListener())},t.prototype.render=function(){var e=this.props.children,t=this.state,n=t.isEnabled,r=t.variables;return t.canRender?e(n,r):null},t}(i.Component)),O=o.getLogger(""),T=v(function(e){function t(t){var n=e.call(this,t)||this;n.unregisterUserListener=function(){},n.autoUpdate=!1;var r=t.autoUpdate,i=t.isServerSide,o=t.optimizely,a=t.experiment;if(n.autoUpdate=!!r,i){if(null===o)throw new Error("optimizely prop must be supplied");var s=o.activate(a);n.state={canRender:!0,variation:s}}else n.state={canRender:!1,variation:null};return n}return h(t,e),t.prototype.componentDidMount=function(){var e=this,t=this.props,n=t.experiment,r=t.optimizely,i=t.optimizelyReadyTimeout,o=t.isServerSide,a=t.timeout;if(!r)throw new Error("optimizely prop must be supplied");if(!o){var s=void 0!==a?a:i;r.onReady({timeout:s}).then((function(t){t.success?O.info('experiment="%s" successfully rendered for user="%s"',n,r.user.id):O.info('experiment="%s" could not be checked before timeout of %sms, reason="%s" ',n,void 0===a?5e3:a,t.reason||"");var i=r.activate(n);e.setState({canRender:!0,variation:i}),e.autoUpdate&&e.setupAutoUpdateListeners()}))}},t.prototype.setupAutoUpdateListeners=function(){var e=this,t=this.props,n=t.optimizely,r=t.experiment;null!==n&&(this.optimizelyNotificationId=n.notificationCenter.addNotificationListener("OPTIMIZELY_CONFIG_UPDATE",(function(){O.info('OPTIMIZELY_CONFIG_UPDATE, re-evaluating experiment="%s" for user="%s"',r,n.user.id);var t=n.activate(r);e.setState({variation:t})})),this.unregisterUserListener=n.onUserUpdate((function(){O.info('User update, re-evaluating experiment="%s" for user="%s"',r,n.user.id);var t=n.activate(r);e.setState({variation:t})})))},t.prototype.componentWillUnmount=function(){var e=this.props,t=e.optimizely;!e.isServerSide&&this.autoUpdate&&(t&&this.optimizelyNotificationId&&t.notificationCenter.removeNotificationListener(this.optimizelyNotificationId),this.unregisterUserListener())},t.prototype.render=function(){var e=this.props.children,t=this.state,n=t.variation;if(!t.canRender)return null;if(null!=e&&"function"===typeof e)return e(n);var r=null;return i.Children.forEach(this.props.children,(function(e){!r&&i.isValidElement(e)&&(e.props.variation?n===e.props.variation&&(r=e):e.props.default&&(r=e))})),r?i.cloneElement(r,{variation:n}):null},t}(i.Component)),N=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return h(t,e),t.prototype.render=function(){return this.props.children},t}(i.Component),R=o.getLogger("ReactSDK"),A={dispatchEvent:function(e,t){R.debug("Event not dispatched by disabled event dispatcher: %s",(function(){var t;try{t=JSON.stringify(e)}catch(e){t="error stringifying event"}return t}))}};Object.defineProperty(t,"enums",{enumerable:!0,get:function(){return s.enums}}),Object.defineProperty(t,"errorHandler",{enumerable:!0,get:function(){return s.errorHandler}}),Object.defineProperty(t,"eventDispatcher",{enumerable:!0,get:function(){return s.eventDispatcher}}),Object.defineProperty(t,"logging",{enumerable:!0,get:function(){return s.logging}}),Object.defineProperty(t,"setLogLevel",{enumerable:!0,get:function(){return s.setLogLevel}}),Object.defineProperty(t,"setLogger",{enumerable:!0,get:function(){return s.setLogger}}),t.OptimizelyContextConsumer=l,t.OptimizelyContextProvider=d,t.OptimizelyExperiment=T,t.OptimizelyFeature=I,t.OptimizelyProvider=g,t.OptimizelyVariation=N,t.createInstance=function(e){return new E(e)},t.logOnlyEventDispatcher=A,t.withOptimizely=v},"5eb32175a0bcf687b36c":function(e,t){e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},"5ef9de3df8d92ea0e41c":function(e,t,n){"use strict";var r=n("0efece4c8cb91e128a85"),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function c(e){return r.isMemo(e)?a:s[e.$$typeof]||i}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0};var u=Object.defineProperty,f=Object.getOwnPropertyNames,l=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(t,n,r){if("string"!==typeof n){if(h){var i=p(n);i&&i!==h&&e(t,i,r)}var a=f(n);l&&(a=a.concat(l(n)));for(var s=c(t),b=c(n),_=0;_2&&void 0!==arguments[2]?arguments[2]:"/",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"1",i=new Date;i.setFullYear(i.getFullYear()+1),document.cookie=encodeURIComponent(e)+"="+r+"; expires="+i.toGMTString()+(t?"; domain="+t:"")+(n?"; path="+n:"")}function s(){var e=o("ckns_mvt");return e||a("ckns_mvt",".bbc.co.uk","/",e=i()()),e}},"641bb0311bdb37373552":function(e,t,n){var r,i,o,a=n("f067ac76b1240cb9aa03"),s=0,c=[],u=a.options.__r,f=a.options.diffed,l=a.options.__c,d=a.options.unmount;function p(e,t){a.options.__h&&a.options.__h(i,e,s||t),s=0;var n=i.__H||(i.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function h(e){return s=1,b(I,e)}function b(e,t,n){var o=p(r++,2);return o.__c||(o.__c=i,o.__=[n?n(t):I(void 0,t),function(t){var n=e(o.__[0],t);o.__[0]!==n&&(o.__[0]=n,o.__c.setState({}))}]),o.__}function _(e,t){var n=p(r++,4);!a.options.__s&&m(n.__H,t)&&(n.__=e,n.__H=t,i.__h.push(n))}function g(e,t){var n=p(r++,7);return m(n.__H,t)?(n.__H=t,n.__h=e,n.__=e()):n.__}function v(){c.some((function(e){if(e.__P)try{e.__H.__h.forEach(y),e.__H.__h.forEach(E),e.__H.__h=[]}catch(t){return e.__H.__h=[],a.options.__e(t,e.__v),!0}})),c=[]}function y(e){e.t&&e.t()}function E(e){var t=e.__();"function"==typeof t&&(e.t=t)}function m(e,t){return!e||t.some((function(t,n){return t!==e[n]}))}function I(e,t){return"function"==typeof t?t(e):t}a.options.__r=function(e){u&&u(e),r=0,(i=e.__c).__H&&(i.__H.__h.forEach(y),i.__H.__h.forEach(E),i.__H.__h=[])},a.options.diffed=function(e){f&&f(e);var t=e.__c;if(t){var n=t.__H;n&&n.__h.length&&(1!==c.push(t)&&o===a.options.requestAnimationFrame||((o=a.options.requestAnimationFrame)||function(e){var t,n=function(){clearTimeout(r),cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);"undefined"!=typeof window&&(t=requestAnimationFrame(n))})(v))}},a.options.__c=function(e,t){t.some((function(e){try{e.__h.forEach(y),e.__h=e.__h.filter((function(e){return!e.__||E(e)}))}catch(n){t.some((function(e){e.__h&&(e.__h=[])})),t=[],a.options.__e(n,e.__v)}})),l&&l(e,t)},a.options.unmount=function(e){d&&d(e);var t=e.__c;if(t){var n=t.__H;if(n)try{n.__.forEach((function(e){return e.t&&e.t()}))}catch(e){a.options.__e(e,t.__v)}}},t.useState=h,t.useReducer=b,t.useEffect=function(e,t){var n=p(r++,3);!a.options.__s&&m(n.__H,t)&&(n.__=e,n.__H=t,i.__H.__h.push(n))},t.useLayoutEffect=_,t.useRef=function(e){return s=5,g((function(){return{current:e}}),[])},t.useImperativeHandle=function(e,t,n){s=6,_((function(){"function"==typeof e?e(t()):e&&(e.current=t())}),null==n?n:n.concat(e))},t.useMemo=g,t.useCallback=function(e,t){return s=8,g((function(){return e}),t)},t.useContext=function(e){var t=i.context[e.__c],n=p(r++,9);return n.__c=e,t?(null==n.__&&(n.__=!0,t.sub(i)),t.props.value):e.__},t.useDebugValue=function(e,t){a.options.useDebugValue&&a.options.useDebugValue(t?t(e):e)},t.useErrorBoundary=function(e){var t=p(r++,10),n=h();return t.__=e,i.componentDidCatch||(i.componentDidCatch=function(e){t.__&&t.__(e),n[1](e)}),[n[0],function(){n[1](void 0)}]}},"645b82c78363c6c8b9ef":function(e,t,n){var r=n("c161013742249fbd15d0");e.exports=function(e){return r(this,e).has(e)}},"64b04a93b2ad0294c239":function(e,t){e.exports=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}},"65955717fc58c97d7378":function(e,t,n){var r=n("f3b0ff1628e56352bcbf"),i=n("f883c6a0eaee60a48ea0"),o=n("d3a850c4000d77bccc89"),a=n("cef4e105446199aaf71e"),s=/^\[object .+?Constructor\]$/,c=Function.prototype,u=Object.prototype,f=c.toString,l=u.hasOwnProperty,d=RegExp("^"+f.call(l).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!o(e)||i(e))&&(r(e)?d:s).test(a(e))}},"662a95466a476544525a":function(e,t,n){(function(e,t){(function(){"use strict";function n(e){var t=this.constructor;return this.then((function(n){return t.resolve(e()).then((function(){return n}))}),(function(n){return t.resolve(e()).then((function(){return t.reject(n)}))}))}var r=setTimeout;function i(){}function o(e){if(!(this instanceof o))throw new TypeError("Promises must be constructed via new");if("function"!==typeof e)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],l(e,this)}function a(e,t){for(;3===e._state;)e=e._value;0!==e._state?(e._handled=!0,o._immediateFn((function(){var n=1===e._state?t.onFulfilled:t.onRejected;if(null!==n){var r;try{r=n(e._value)}catch(e){return void c(t.promise,e)}s(t.promise,r)}else(1===e._state?s:c)(t.promise,e._value)}))):e._deferreds.push(t)}function s(e,t){try{if(t===e)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"===typeof t||"function"===typeof t)){var n=t.then;if(t instanceof o)return e._state=3,e._value=t,void u(e);if("function"===typeof n)return void l((r=n,i=t,function(){r.apply(i,arguments)}),e)}e._state=1,e._value=t,u(e)}catch(t){c(e,t)}var r,i}function c(e,t){e._state=2,e._value=t,u(e)}function u(e){2===e._state&&0===e._deferreds.length&&o._immediateFn((function(){e._handled||o._unhandledRejectionFn(e._value)}));for(var t=0,n=e._deferreds.length;t-1))return-1;this.__notificationListeners[e]||(this.__notificationListeners[e]=[]);var n=!1;if(i.forEach(this.__notificationListeners[e],(function(e){if(e.callback===t)return n=!0,!1})),n)return-1;this.__notificationListeners[e].push({id:this.__listenerId,callback:t});var o=this.__listenerId;return this.__listenerId+=1,o}catch(e){return this.logger.log(a.ERROR,e.message),this.errorHandler.handleError(e),-1}},c.prototype.removeNotificationListener=function(e){try{var t,n;if(i.forOwn(this.__notificationListeners,(function(r,o){if(i.forEach(r,(function(r,i){if(r.id===e)return t=i,n=o,!1})),void 0!==t&&void 0!==n)return!1})),void 0!==t&&void 0!==n)return this.__notificationListeners[n].splice(t,1),!0}catch(e){this.logger.log(a.ERROR,e.message),this.errorHandler.handleError(e)}return!1},c.prototype.clearAllNotificationListeners=function(){try{i.forOwn(r.NOTIFICATION_TYPES,function(e){this.__notificationListeners[e]=[]}.bind(this))}catch(e){this.logger.log(a.ERROR,e.message),this.errorHandler.handleError(e)}},c.prototype.clearNotificationListeners=function(e){try{this.__notificationListeners[e]=[]}catch(e){this.logger.log(a.ERROR,e.message),this.errorHandler.handleError(e)}},c.prototype.sendNotifications=function(e,t){try{i.forEach(this.__notificationListeners[e],function(n){var r=n.callback;try{r(t)}catch(t){this.logger.log(a.ERROR,o(s.NOTIFICATION_LISTENER_EXCEPTION,"NOTIFICATION_CENTER",e,t.message))}}.bind(this))}catch(e){this.logger.log(a.ERROR,e.message),this.errorHandler.handleError(e)}},e.exports={createNotificationCenter:function(e){return new c(e)}}},"782ea1fc620fe246f97b":function(e,t,n){var r=n("971268c5be9618ca3262").sprintf,i=n("df7b55382888b4ee215c").ERROR_MESSAGES,o="CONFIG_VALIDATOR",a=n("df7b55382888b4ee215c").DATAFILE_VERSIONS,s=[a.V2,a.V3,a.V4];e.exports={validate:function(e){if(e.errorHandler&&"function"!==typeof e.errorHandler.handleError)throw new Error(r(i.INVALID_ERROR_HANDLER,o));if(e.eventDispatcher&&"function"!==typeof e.eventDispatcher.dispatchEvent)throw new Error(r(i.INVALID_EVENT_DISPATCHER,o));if(e.logger&&"function"!==typeof e.logger.log)throw new Error(r(i.INVALID_LOGGER,o));return!0},validateDatafile:function(e){if(!e)throw new Error(r(i.NO_DATAFILE_SPECIFIED,o));if("string"===typeof e||e instanceof String)try{e=JSON.parse(e)}catch(e){throw new Error(r(i.INVALID_DATAFILE_MALFORMED,o))}if(-1===s.indexOf(e.version))throw new Error(r(i.INVALID_DATAFILE_VERSION,o,e.version));return!0}}},"79d2d347b10807f181e9":function(e,t,n){var r=n("16a2663068191a21c134"),i=n("4b93c5a7bb60dd6ab0f4");e.exports=function(e){return i(e)&&"[object Set]"==r(e)}},"7aeba379895dac1dee7e":function(e,t,n){var r=n("90d51c13c6e8468d0322");function i(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(i.Cache||r),n}i.Cache=r,e.exports=i},"7b70b84aafc3be043372":function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n-1&&e%1==0&&e<=9007199254740991}},"8471fa3e948e6f8d4661":function(e,t,n){var r=n("d6d252c712bd312d821d"),i=n("b817c1cd32d5e001a440"),o=n("df7b55382888b4ee215c"),a=n("04fddb994f93fcfa2bf7"),s=n("ed435abeaba8ecaa0649"),c=n("e3aa348ea6f439469583"),u=n("971268c5be9618ca3262").sprintf,f="DECISION_SERVICE",l=o.ERROR_MESSAGES,d=o.LOG_LEVEL,p=o.LOG_MESSAGES,h=o.DECISION_SOURCES;function b(e){this.audienceEvaluator=new r(e.UNSTABLE_conditionEvaluators),this.forcedVariationMap={},this.logger=e.logger,this.userProfileService=e.userProfileService||null}b.prototype.getVariation=function(e,t,n,r){var o=this._getBucketingId(n,r);if(!this.__checkIfExperimentIsActive(e,t,n))return null;var a=e.experimentKeyMap[t],s=this.getForcedVariation(e,t,n);if(s)return s;var c=this.__getWhitelistedVariation(a,n);if(c)return c.key;var l=this.__resolveExperimentBucketMap(n,r);if(c=this.__getStoredVariation(e,a,n,l))return this.logger.log(d.INFO,u(p.RETURNING_STORED_VARIATION,f,c.key,t,n)),c.key;if(!this.__checkIfUserIsInAudience(e,t,n,r))return null;var h=this.__buildBucketerParams(e,t,o,n),b=i.bucket(h);return(c=e.variationIdMap[b])?(this.__saveUserProfile(a,c,n,l),c.key):null},b.prototype.__resolveExperimentBucketMap=function(e,t){t=t||{};var n=this.__getUserProfile(e)||{},r=t[o.CONTROL_ATTRIBUTES.STICKY_BUCKETING_KEY];return a.assignIn({},n.experiment_bucket_map,r)},b.prototype.__checkIfExperimentIsActive=function(e,t,n){if(!s.isActive(e,t)){var r=u(p.EXPERIMENT_NOT_RUNNING,f,t);return this.logger.log(d.INFO,r),!1}return!0},b.prototype.__getWhitelistedVariation=function(e,t){if(!a.isEmpty(e.forcedVariations)&&e.forcedVariations.hasOwnProperty(t)){var n=e.forcedVariations[t];if(e.variationKeyMap.hasOwnProperty(n)){var r=u(p.USER_FORCED_IN_VARIATION,f,t,n);return this.logger.log(d.INFO,r),e.variationKeyMap[n]}var i=u(p.FORCED_BUCKETING_FAILED,f,n,t);return this.logger.log(d.ERROR,i),null}return null},b.prototype.__checkIfUserIsInAudience=function(e,t,n,r){var i=s.getExperimentAudienceConditions(e,t),o=s.getAudiencesById(e);this.logger.log(d.DEBUG,u(p.EVALUATING_AUDIENCES_COMBINED,f,t,JSON.stringify(i)));var a=this.audienceEvaluator.evaluate(i,o,r);if(this.logger.log(d.INFO,u(p.AUDIENCE_EVALUATION_RESULT_COMBINED,f,t,a.toString().toUpperCase())),!a){var c=u(p.USER_NOT_IN_EXPERIMENT,f,n,t);return this.logger.log(d.INFO,c),!1}return!0},b.prototype.__buildBucketerParams=function(e,t,n,r){var i={};return i.experimentKey=t,i.experimentId=s.getExperimentId(e,t),i.userId=r,i.trafficAllocationConfig=s.getTrafficAllocation(e,t),i.experimentKeyMap=e.experimentKeyMap,i.groupIdMap=e.groupIdMap,i.variationIdMap=e.variationIdMap,i.logger=this.logger,i.bucketingId=n,i},b.prototype.__getStoredVariation=function(e,t,n,r){if(r.hasOwnProperty(t.id)){var i=r[t.id],o=i.variation_id;if(e.variationIdMap.hasOwnProperty(o))return e.variationIdMap[i.variation_id];this.logger.log(d.INFO,u(p.SAVED_VARIATION_NOT_FOUND,f,n,o,t.key))}return null},b.prototype.__getUserProfile=function(e){var t={user_id:e,experiment_bucket_map:{}};if(!this.userProfileService)return t;try{return this.userProfileService.lookup(e)}catch(t){this.logger.log(d.ERROR,u(l.USER_PROFILE_LOOKUP_ERROR,f,e,t.message))}},b.prototype.__saveUserProfile=function(e,t,n,r){if(this.userProfileService)try{var i=a.cloneDeep(r);i[e.id]={variation_id:t.id},this.userProfileService.save({user_id:n,experiment_bucket_map:i}),this.logger.log(d.INFO,u(p.SAVED_VARIATION,f,t.key,e.key,n))}catch(e){this.logger.log(d.ERROR,u(l.USER_PROFILE_SAVE_ERROR,f,n,e.message))}},b.prototype.getVariationForFeature=function(e,t,n,r){var i=this._getVariationForFeatureExperiment(e,t,n,r);if(null!==i.variation)return this.logger.log(d.DEBUG,u(p.USER_IN_FEATURE_EXPERIMENT,f,n,i.variation.key,i.experiment.key,t.key)),i;this.logger.log(d.DEBUG,u(p.USER_NOT_IN_FEATURE_EXPERIMENT,f,n,t.key));var o=this._getVariationForRollout(e,t,n,r);return null!==o.variation?(this.logger.log(d.DEBUG,u(p.USER_IN_ROLLOUT,f,n,t.key)),o):(this.logger.log(d.DEBUG,u(p.USER_NOT_IN_ROLLOUT,f,n,t.key)),o)},b.prototype._getVariationForFeatureExperiment=function(e,t,n,r){var i=null,o=null;if(t.hasOwnProperty("groupId")){var a=e.groupIdMap[t.groupId];a&&(i=this._getExperimentInGroup(e,a,n))&&-1!==t.experimentIds.indexOf(i.id)&&(o=this.getVariation(e,i.key,n,r))}else t.experimentIds.length>0?(i=s.getExperimentFromId(e,t.experimentIds[0],this.logger))&&(o=this.getVariation(e,i.key,n,r)):this.logger.log(d.DEBUG,u(p.FEATURE_HAS_NO_EXPERIMENTS,f,t.key));var c=null;return null!==o&&null!==i&&(c=i.variationKeyMap[o]),{experiment:i,variation:c,decisionSource:h.FEATURE_TEST}},b.prototype._getExperimentInGroup=function(e,t,n){var r=i.bucketUserIntoExperiment(t,n,n,this.logger);if(r){this.logger.log(d.INFO,u(p.USER_BUCKETED_INTO_EXPERIMENT_IN_GROUP,f,n,r,t.id));var o=s.getExperimentFromId(e,r,this.logger);if(o)return o}return this.logger.log(d.INFO,u(p.USER_NOT_BUCKETED_INTO_ANY_EXPERIMENT_IN_GROUP,f,n,t.id)),null},b.prototype._getVariationForRollout=function(e,t,n,r){if(!t.rolloutId)return this.logger.log(d.DEBUG,u(p.NO_ROLLOUT_EXISTS,f,t.key)),{experiment:null,variation:null,decisionSource:h.ROLLOUT};var o=e.rolloutIdMap[t.rolloutId];if(!o)return this.logger.log(d.ERROR,u(l.INVALID_ROLLOUT_ID,f,t.rolloutId,t.key)),{experiment:null,variation:null,decisionSource:h.ROLLOUT};if(0===o.experiments.length)return this.logger.log(d.ERROR,u(p.ROLLOUT_HAS_NO_EXPERIMENTS,f,t.rolloutId)),{experiment:null,variation:null,decisionSource:h.ROLLOUT};var a,s,c,b,_,g=this._getBucketingId(n,r),v=o.experiments.length-1;for(a=0;a=200&&e.status<400)return e;var t=new Error("HTTP request failed ".concat(e.statusText));throw t.response=e,t}t.a={friendlyProductNames:{IPLAYER:"iPlayer",SOUNDS:"Sounds"},get:function(){return r},filterSubscriptionDomains:function(e){if(!e.topic)return!1;var t=e.topic.split(":");return!("urn"!==t[0]||"bbc"!==t[1]||!t[2])&&u.includes(t[2])},fetch:function(){var e=this,t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],n=arguments.length>1?arguments[1]:void 0;return!1===t&&r?Promise.resolve(r):i.b().catch((function(e){throw e})).then((function(){return a(e.fetchCorrectDomainEndpoint(s.env.preferencesUrls.getUK,s.env.preferencesUrls.get),{credentials:"include"})})).catch((function(e){throw e})).then((function(t){var i=!1;if((r=t).key)throw new Error(r);return r.preferences||(i=!0,r.preferences={readFilter:"undefined"!==typeof o.a.filter?JSON.stringify(o.a.getCleanArray()):null}),r.preferences.productsEnabled?(r.preferences.productsEnabled=r.preferences.productsEnabled.filter((function(e){return c.includes(e.product)})),r.preferences.productsEnabled.length0&&void 0!==arguments[0]&&arguments[0];return this.set({preferences:{readFilter:"undefined"!==typeof o.a.filter?JSON.stringify(o.a.getCleanArray()):null,lastReadFlag:e}})},sendClick:function(e){var t=this,n={preference:r.preferences,notificationId:e.id,topicUrn:e.topic[0]};return i.b().catch((function(e){throw e})).then((function(){return fetch(t.fetchCorrectDomainEndpoint(s.env.preferencesUrls.postClickUK,s.env.preferencesUrls.postClick),{method:"POST",credentials:"include",headers:{Accept:"*/*","Content-Type":"application/json"},body:JSON.stringify(n)})})).then(f).catch((function(e){throw e}))},countActiveSubscriptions:function(){var e=0;return r.subscriptions&&r.subscriptions.forEach((function(t){t.enabled&&e++})),e},updateUserOnBoarding:function(e){var t=r.preferences||{};t||(t={lastReadFlag:!0,productsEnabled:[],readFilter:o.a.getCleanArray()},c.forEach((function(e){t.productsEnabled.push({product:e,enabled:!0})}))),t.hasOnboarded=!0,t.onboardingFlag=!0,t.lastReadFlag=!0,this.set(r).then(e).catch((function(t){throw e(void 0,t),t}))}}},"883c01ec557fc8a5e1b1":function(e,t,n){"use strict";function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),r(n("b6963ce77692a23c9f7e")),r(n("a1e2c8860642d35b60b7")),r(n("c4fe9c016b297a84f929"))},"8a06dda852929deeb4f5":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n("3e9c7e5351d86134f5f6");function i(e){return Object.keys(e).map((function(t){return e[t]}))}t.getTimestamp=function(){return(new Date).getTime()},t.generateUUID=function(){return r.v4()},t.isValidEnum=function(e,t){for(var n=!1,r=Object.keys(e),i=0;i1?n[o-1]:void 0,s=o>2?n[2]:void 0;for(a=e.length>3&&"function"==typeof a?(o--,a):void 0,s&&i(n[0],n[1],s)&&(a=o<3?void 0:a,o=1),t=Object(t);++r>>((3&t)<<3)&255;return i}}},a0063d3cf13048bed80e:function(e,t,n){var r=n("44b7d0c5261c9879c084");e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}},a0ed748e910ad4d001fc:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n("883c01ec557fc8a5e1b1").getLogger("EventProcessor"),i=function(){function e(e){var t=e.timeout,n=e.callback;this.timeout=Math.max(t,0),this.callback=n}return e.prototype.start=function(){this.timeoutId=setTimeout(this.callback,this.timeout)},e.prototype.refresh=function(){this.stop(),this.start()},e.prototype.stop=function(){this.timeoutId&&clearTimeout(this.timeoutId)},e}(),o=function(){function e(e){var t=e.sink;this.sink=t}return e.prototype.start=function(){},e.prototype.stop=function(){return Promise.resolve()},e.prototype.enqueue=function(e){this.sink([e])},e}();t.SingleEventQueue=o;var a=function(){function e(e){var t=e.flushInterval,n=e.maxQueueSize,r=e.sink,o=e.batchComparator;this.buffer=[],this.maxQueueSize=Math.max(n,1),this.sink=r,this.batchComparator=o,this.timer=new i({callback:this.flush.bind(this),timeout:t}),this.started=!1}return e.prototype.start=function(){this.started=!0},e.prototype.stop=function(){this.started=!1;var e=this.sink(this.buffer);return this.buffer=[],this.timer.stop(),e},e.prototype.enqueue=function(e){if(this.started){var t=this.buffer[0];t&&!this.batchComparator(t,e)&&this.flush(),0===this.buffer.length&&this.timer.refresh(),this.buffer.push(e),this.buffer.length>=this.maxQueueSize&&this.flush()}else r.warn("Queue is stopped, not accepting event")},e.prototype.flush=function(){this.sink(this.buffer),this.buffer=[],this.timer.stop()},e}();t.DefaultEventQueue=a},a1cf5d6fa4ed65a6ddd5:function(e,t,n){var r=n("ab33744f6df37edcb9b2"),i=n("16a2663068191a21c134"),o=n("e99524bb668f88c6c42e"),a=n("f2ef6f6e544aad97aa22"),s=n("c9327538105d995811b8"),c=n("72301e3cc725dd502232"),u=n("47e9e16a3e339321eec5"),f=n("1ef5eae0d45731e89b6f"),l=Object.prototype.hasOwnProperty;e.exports=function(e){if(null==e)return!0;if(s(e)&&(a(e)||"string"==typeof e||"function"==typeof e.splice||c(e)||f(e)||o(e)))return!e.length;var t=i(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(u(e))return!r(e).length;for(var n in e)if(l.call(e,n))return!1;return!0}},a1e2c8860642d35b60b7:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.NOTSET=0]="NOTSET",e[e.DEBUG=1]="DEBUG",e[e.INFO=2]="INFO",e[e.WARNING=3]="WARNING",e[e.ERROR=4]="ERROR"}(t.LogLevel||(t.LogLevel={}))},a58ad8823d4789272111:function(e,t){e.exports=function(e){return function(){return e}}},a5bc7aec7a8560815f52:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n("b624c59acc79dafa62e5"),a=n("9b647fb94f2bf6adda87"),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.formatEvents=function(e){return{url:"https://logx.optimizely.com/v1/events",httpVerb:"POST",params:a.makeBatchedEventV1(e)}},t}(o.AbstractEventProcessor);t.LogTierV1EventProcessor=s},a607943c6ce671e7106b:function(e,t,n){var r=n("104a011c3c0c4bae71c3")(Object.getPrototypeOf,Object);e.exports=r},a7748d7c475f1fd90265:function(e,t,n){var r=n("e4c91c4fa5f7e2d6b35a"),i=n("2da8456225be17b38fb7")(r);e.exports=i},ab33744f6df37edcb9b2:function(e,t,n){var r=n("47e9e16a3e339321eec5"),i=n("7e56d82a60dcbc0a4c8d"),o=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return i(e);var t=[];for(var n in Object(e))o.call(e,n)&&"constructor"!=n&&t.push(n);return t}},ab5d2baa0493dc68d446:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a=n("42fc3dd1e1dd566874a9"),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.makeGetRequest=function(e,t){return a.makeGetRequest(e,t)},t.prototype.getConfigDefaults=function(){return{autoUpdate:!1}},t}(o(n("30e27ea3d8e02da48c67")).default);t.default=s},acf4ca991a0973bc409e:function(e,t,n){(function(e){var r=n("18caba858d9ea0f67284"),i=t&&!t.nodeType&&t,o=i&&"object"==typeof e&&e&&!e.nodeType&&e,a=o&&o.exports===i?r.Buffer:void 0,s=a?a.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=s?s(n):new e.constructor(n);return e.copy(r),r}}).call(this,n("f586cf5b9f4b7719b2c1")(e))},ad8470b596eb2ec5826f:function(e,t,n){var r=n("4be2c15021f717a728f0")(n("18caba858d9ea0f67284"),"Set");e.exports=r},ad9f55ad5227816d53aa:function(e,t,n){var r=n("b38e1671cef3d484f410"),i=n("f42a6429a211b8c6d760"),o=n("c7dc9991952f21abcb7d"),a=n("4c2c765baf933e4dff2b"),s=n("71221445b5fb2229ffea");function c(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t1?new i.DefaultEventQueue({flushInterval:o,maxQueueSize:c,sink:function(e){return f.drainQueue(e)},batchComparator:r.areEventContextsEqual}):new i.SingleEventQueue({sink:function(e){return f.drainQueue(e)}}),this.notificationCenter=u}return e.prototype.drainQueue=function(e){var t=this;return new Promise((function(n){if(s.debug("draining queue with %s events",e.length),0!==e.length){var r=t.formatEvents(e);t.dispatcher.dispatchEvent(r,(function(){n()})),t.notificationCenter&&t.notificationCenter.sendNotifications(a.NOTIFICATION_TYPES.LOG_EVENT,r)}else n()}))},e.prototype.process=function(e){this.queue.enqueue(e)},e.prototype.stop=function(){try{return this.queue.stop()}catch(e){s.error('Error stopping EventProcessor: "%s"',e.message,e)}return Promise.resolve()},e.prototype.start=function(){this.queue.start()},e}();t.AbstractEventProcessor=c},b6963ce77692a23c9f7e:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){}return e.prototype.handleError=function(e){},e}();t.NoopErrorHandler=r;var i=new r;t.setErrorHandler=function(e){i=e},t.getErrorHandler=function(){return i},t.resetErrorHandler=function(){i=new r}},b6d66deb3be454ec4999:function(e,t){e.exports=function(e){return this.__data__.get(e)}},b817c1cd32d5e001a440:function(e,t,n){var r=n("df7b55382888b4ee215c"),i=n("e0764ca8241df4e5c3b8"),o=n("971268c5be9618ca3262").sprintf,a=r.ERROR_MESSAGES,s=r.LOG_LEVEL,c=r.LOG_MESSAGES,u=Math.pow(2,32);e.exports={bucket:function(t){var n=t.experimentKeyMap[t.experimentKey].groupId;if(n){var r=t.groupIdMap[n];if(!r)throw new Error(o(a.INVALID_GROUP_ID,"BUCKETER",n));if("random"===r.policy){var i=e.exports.bucketUserIntoExperiment(r,t.bucketingId,t.userId,t.logger);if(null===i){var u=o(c.USER_NOT_IN_ANY_EXPERIMENT,"BUCKETER",t.userId,n);return t.logger.log(s.INFO,u),null}if(i!==t.experimentId){var f=o(c.USER_NOT_BUCKETED_INTO_EXPERIMENT_IN_GROUP,"BUCKETER",t.userId,t.experimentKey,n);return t.logger.log(s.INFO,f),null}var l=o(c.USER_BUCKETED_INTO_EXPERIMENT_IN_GROUP,"BUCKETER",t.userId,t.experimentKey,n);t.logger.log(s.INFO,l)}}var d=o("%s%s",t.bucketingId,t.experimentId),p=e.exports._generateBucketValue(d),h=o(c.USER_ASSIGNED_TO_VARIATION_BUCKET,"BUCKETER",p,t.userId);t.logger.log(s.DEBUG,h);var b=e.exports._findBucket(p,t.trafficAllocationConfig);if(b){if(!t.variationIdMap.hasOwnProperty(b)){var _=o(c.INVALID_VARIATION_ID,"BUCKETER");return t.logger.log(s.WARNING,_),null}var g=t.variationIdMap[b].key,v=o(c.USER_HAS_VARIATION,"BUCKETER",t.userId,g,t.experimentKey);t.logger.log(s.INFO,v)}else{var y=o(c.USER_HAS_NO_VARIATION,"BUCKETER",t.userId,t.experimentKey);t.logger.log(s.DEBUG,y)}return b},bucketUserIntoExperiment:function(t,n,r,i){var a=o("%s%s",n,t.id),u=e.exports._generateBucketValue(a);i.log(s.DEBUG,o(c.USER_ASSIGNED_TO_EXPERIMENT_BUCKET,"BUCKETER",u,r));var f=t.trafficAllocation;return e.exports._findBucket(u,f)},_findBucket:function(e,t){for(var n=0;n1?t-1:0),r=1;r1?t-1:0),r=1;r=this.logLevel},e.prototype.getLogLevelName=function(e){switch(e){case o.LogLevel.DEBUG:return"DEBUG";case o.LogLevel.INFO:return"INFO ";case o.LogLevel.WARNING:return"WARN ";case o.LogLevel.ERROR:return"ERROR";default:return"NOTSET"}},e.prototype.consoleLog=function(e,t){switch(e){case o.LogLevel.DEBUG:console.log.apply(console,t);break;case o.LogLevel.INFO:console.info.apply(console,t);break;case o.LogLevel.WARNING:console.warn.apply(console,t);break;case o.LogLevel.ERROR:console.error.apply(console,t);break;default:console.log.apply(console,t)}},e}();t.ConsoleLogHandler=u;var f=o.LogLevel.NOTSET,l=null,d=function(){function e(e){void 0===e&&(e={}),this.messagePrefix="",e.messagePrefix&&(this.messagePrefix=e.messagePrefix)}return e.prototype.log=function(e,t){this.internalLog(s(e),{message:t,splat:[]})},e.prototype.info=function(e){for(var t=[],n=1;n[\s\S]*?<\/script>/gi,(function(e){var n=e.substring(e.indexOf(">")+1);return n=n.slice(0,n.indexOf("0&&void 0!==arguments[0]?arguments[0]:void 0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"notifications",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:window.location.href,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"event",o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:void 0,a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:void 0,s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"Personalisation",c=arguments.length>8&&void 0!==arguments[8]?arguments[8]:"rw",u=arguments.length>9&&void 0!==arguments[9]?arguments[9]:"Notifications",f={detail:{container:s,label:u,type:c,source:n}};t&&(f.detail.metadata=t),r&&(f.detail.result=r),e&&(f.detail.personalisation={PER:e}),a&&(f.detail.elem=a),o&&(f.detail.originalEvent=o),document.dispatchEvent(new CustomEvent("bbc-user-".concat(i),f))},logClick:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"notifications",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:window.location.href,i=arguments.length>4?arguments[4]:void 0,o=arguments.length>5?arguments[5]:void 0;this.log(e,t,n,r,"click",i,o)},serialiseTopic:function(e){var t,n=e.slice(0);return n.forEach((function(e,t,n){n[t]=e.substring(0,e.lastIndexOf(":"))})),t=n.slice(0,5).join("!").replace(/urn:bbc:/g,"").replace(/:/g,"-"),t=n.length>5?t.concat("!more than 5"):t},logNotification:function(e){this.log(e.notification.title,{STA:"blueDot",PRI:(e.priority||"normal").toLowerCase(),TOP:this.serialiseTopic(e.topic)},e.product.toLowerCase(),e.url),n.push(e.id)},logNewNotifications:function(e,t){var r=this;"shown"===t&&e.forEach((function(e){"new"!==e.status||n.includes(e.id)||r.logNotification(e)}))}}},cef4e105446199aaf71e:function(e,t){var n=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return n.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},cf2ba28ba35a9c28907c:function(e,t){var n=["and","or","not"];function r(e,t){if(Array.isArray(e)){var i=e[0],o=e.slice(1);switch(-1===n.indexOf(i)&&(i="or",o=e),i){case"and":return function(e,t){for(var n=!1,i=0;i0){var n=r(e[0],t);return null===n?null:!n}return null}(o,t);default:return function(e,t){for(var n=!1,i=0;if))return!1;var d=c.get(e);if(d&&c.get(t))return d==t;var p=-1,h=!0,b=2&n?new r:void 0;for(c.set(e,t),c.set(t,e);++pl},f.lt=function(e,t,n){var i=e.name,u=t[e.name],f=typeof u,l=e.value;if(!r.isFinite(l))return n.log(a.WARNING,o(s.UNEXPECTED_CONDITION_VALUE,c,JSON.stringify(e))),null;if(null===u)return n.log(a.DEBUG,o(s.UNEXPECTED_TYPE_NULL,c,JSON.stringify(e),i)),null;if(!r.isNumber(u))return n.log(a.WARNING,o(s.UNEXPECTED_TYPE,c,JSON.stringify(e),f,i)),null;if(!r.isFinite(u))return n.log(a.WARNING,o(s.OUT_OF_BOUNDS,c,JSON.stringify(e),i)),null;return u>>16)*a&65535)<<16)&4294967295)<<15|c>>>17))*s+(((c>>>16)*s&65535)<<16)&4294967295)<<13|i>>>19))+((5*(i>>>16)&65535)<<16)&4294967295))+((58964+(o>>>16)&65535)<<16);switch(c=0,n){case 3:c^=(255&e.charCodeAt(u+2))<<16;case 2:c^=(255&e.charCodeAt(u+1))<<8;case 1:i^=c=(65535&(c=(c=(65535&(c^=255&e.charCodeAt(u)))*a+(((c>>>16)*a&65535)<<16)&4294967295)<<15|c>>>17))*s+(((c>>>16)*s&65535)<<16)&4294967295}return i^=e.length,i=2246822507*(65535&(i^=i>>>16))+((2246822507*(i>>>16)&65535)<<16)&4294967295,i=3266489909*(65535&(i^=i>>>13))+((3266489909*(i>>>16)&65535)<<16)&4294967295,(i^=i>>>16)>>>0}var n=t;n.v2=function(e,t){for(var n,r=e.length,i=t^r,o=0;r>=4;)n=1540483477*(65535&(n=255&e.charCodeAt(o)|(255&e.charCodeAt(++o))<<8|(255&e.charCodeAt(++o))<<16|(255&e.charCodeAt(++o))<<24))+((1540483477*(n>>>16)&65535)<<16),i=1540483477*(65535&i)+((1540483477*(i>>>16)&65535)<<16)^(n=1540483477*(65535&(n^=n>>>24))+((1540483477*(n>>>16)&65535)<<16)),r-=4,++o;switch(r){case 3:i^=(255&e.charCodeAt(o+2))<<16;case 2:i^=(255&e.charCodeAt(o+1))<<8;case 1:i=1540483477*(65535&(i^=255&e.charCodeAt(o)))+((1540483477*(i>>>16)&65535)<<16)}return i=1540483477*(65535&(i^=i>>>13))+((1540483477*(i>>>16)&65535)<<16),(i^=i>>>15)>>>0},n.v3=t,e.exports=n}()},e1b60d05ebeced492135:function(e,t,n){e.exports=n.p+"/css/onboarding.min.css"},e3aa348ea6f439469583:function(e,t){e.exports={validate:function(e){return"string"===typeof e&&""!==e}}},e4c91c4fa5f7e2d6b35a:function(e,t,n){var r=n("a58ad8823d4789272111"),i=n("6eb6e7baae7d99cd3bf9"),o=n("43b923cfacc75860e178"),a=i?function(e,t){return i(e,"toString",{configurable:!0,enumerable:!1,value:r(t),writable:!0})}:o;e.exports=a},e86a1dffa60831d5ce49:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n("3e9c7e5351d86134f5f6");function i(e){return Object.keys(e).map((function(t){return e[t]}))}t.getTimestamp=function(){return(new Date).getTime()},t.generateUUID=function(){return r.v4()},t.isValidEnum=function(e,t){for(var n=!1,r=Object.keys(e),i=0;i=200&&e.status<500)return e;var t=new Error("HTTP request failed ".concat(e.statusText));throw t.response=e,t}e.exports=function(e,t){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o="bbc-notifications-".concat(e);return i&&sessionStorage.getItem(o)?new Promise((function(e){e(JSON.parse(sessionStorage.getItem(o)))})):fetch(e,t).then(r).then((function(e){return 404===e.status?null:e.text()})).then((function(e){var t=n(e);return i&&t&&sessionStorage.setItem(o,JSON.stringify(t)),t})).catch((function(e){throw e}))}},e99524bb668f88c6c42e:function(e,t,n){var r=n("33e73011281ee8023d77"),i=n("4b93c5a7bb60dd6ab0f4"),o=Object.prototype,a=o.hasOwnProperty,s=o.propertyIsEnumerable,c=r(function(){return arguments}())?r:function(e){return i(e)&&a.call(e,"callee")&&!s.call(e,"callee")};e.exports=c},e9aab379f407c6096333:function(e,t,n){(function(e){var r="undefined"!==typeof e&&e||"undefined"!==typeof self&&self||window,i=Function.prototype.apply;function o(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new o(i.call(setTimeout,r,arguments),clearTimeout)},t.setInterval=function(){return new o(i.call(setInterval,r,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(r,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},n("c4f90655ae719ce885a6"),t.setImmediate="undefined"!==typeof self&&self.setImmediate||"undefined"!==typeof e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!==typeof self&&self.clearImmediate||"undefined"!==typeof e&&e.clearImmediate||this&&this.clearImmediate}).call(this,n("698d75b157f24ae829cc"))},ea6f6f0a40efa2bb0971:function(e,t,n){var r=n("f819b29f4efbf857daed");e.exports=function(e){return function(t){return r(t,e)}}},ebb7be79b6c15709c3d5:function(e,t,n){var r=n("8bdd4315a9ab62a9788d"),i=n("267a5cf0ab3c1047295f")(r);e.exports=i},ecb23469f3e6290be226:function(e,t,n){var r=n("04fddb994f93fcfa2bf7");e.exports={validateEventBatchSize:function(e){return r.isFinite(e)&&e>=1},validateEventFlushInterval:function(e){return r.isFinite(e)&&e>0}}},ecc4278ea99fd360c3c0:function(e,t,n){var r=n("941955270fde8df3ace1"),i=n("c9327538105d995811b8"),o=n("f72c7c366a646d5e453e"),a=n("d3a850c4000d77bccc89");e.exports=function(e,t,n){if(!a(n))return!1;var s=typeof t;return!!("number"==s?i(n)&&o(t,n.length):"string"==s&&t in n)&&r(n[t],e)}},ed435abeaba8ecaa0649:function(e,t,n){var r=n("04fddb994f93fcfa2bf7"),i=n("df7b55382888b4ee215c"),o=n("971268c5be9618ca3262").sprintf,a=n("782ea1fc620fe246f97b"),s=n("00388ddacef4532261aa"),c="PROJECT_CONFIG",u=i.ERROR_MESSAGES,f=i.LOG_MESSAGES,l=i.LOG_LEVEL,d=i.FEATURE_VARIABLE_TYPES;e.exports={createProjectConfig:function(e){var t,n=r.cloneDeep(e);return r.forEach(n.audiences,(function(e){e.conditions=JSON.parse(e.conditions)})),n.audiencesById=r.keyBy(n.audiences,"id"),r.assign(n.audiencesById,r.keyBy(n.typedAudiences,"id")),n.attributeKeyMap=r.keyBy(n.attributes,"key"),n.eventKeyMap=r.keyBy(n.events,"key"),n.groupIdMap=r.keyBy(n.groups,"id"),r.forEach(n.groupIdMap,(function(e,i){t=r.cloneDeep(e.experiments),r.forEach(t,(function(e){n.experiments.push(r.assignIn(e,{groupId:i}))}))})),n.rolloutIdMap=r.keyBy(n.rollouts||[],"id"),r.forOwn(n.rolloutIdMap,(function(e){r.forEach(e.experiments||[],(function(e){n.experiments.push(r.cloneDeep(e)),e.variationKeyMap=r.keyBy(e.variations,"key")}))})),n.experimentKeyMap=r.keyBy(n.experiments,"key"),n.experimentIdMap=r.keyBy(n.experiments,"id"),n.variationIdMap={},n.variationVariableUsageMap={},r.forEach(n.experiments,(function(e){e.variationKeyMap=r.keyBy(e.variations,"key"),r.assignIn(n.variationIdMap,r.keyBy(e.variations,"id")),r.forOwn(e.variationKeyMap,(function(e){e.variables&&(n.variationVariableUsageMap[e.id]=r.keyBy(e.variables,"id"))}))})),n.experimentFeatureMap={},n.featureKeyMap=r.keyBy(n.featureFlags||[],"key"),r.forOwn(n.featureKeyMap,(function(e){e.variableKeyMap=r.keyBy(e.variables,"key"),r.forEach(e.experimentIds||[],(function(t){n.experimentFeatureMap[t]?n.experimentFeatureMap[t].push(e.id):n.experimentFeatureMap[t]=[e.id];var r=n.experimentIdMap[t];if(r.groupId)return e.groupId=r.groupId,!1}))})),n},getExperimentId:function(e,t){var n=e.experimentKeyMap[t];if(r.isEmpty(n))throw new Error(o(u.INVALID_EXPERIMENT_KEY,c,t));return n.id},getLayerId:function(e,t){var n=e.experimentIdMap[t];if(r.isEmpty(n))throw new Error(o(u.INVALID_EXPERIMENT_ID,c,t));return n.layerId},getAttributeId:function(e,t,n){var r=e.attributeKeyMap[t],i=0===t.indexOf("$opt_");return r?(i&&n.log(l.WARN,o("Attribute %s unexpectedly has reserved prefix %s; using attribute ID instead of reserved attribute name.",t,"$opt_")),r.id):i?t:(n.log(l.DEBUG,o(u.UNRECOGNIZED_ATTRIBUTE,c,t)),null)},getEventId:function(e,t){var n=e.eventKeyMap[t];return n?n.id:null},getExperimentStatus:function(e,t){var n=e.experimentKeyMap[t];if(r.isEmpty(n))throw new Error(o(u.INVALID_EXPERIMENT_KEY,c,t));return n.status},isActive:function(t,n){return"Running"===e.exports.getExperimentStatus(t,n)||"Launched"===e.exports.getExperimentStatus(t,n)},isRunning:function(t,n){return"Running"===e.exports.getExperimentStatus(t,n)},getExperimentAudienceConditions:function(e,t){var n=e.experimentKeyMap[t];if(r.isEmpty(n))throw new Error(o(u.INVALID_EXPERIMENT_KEY,c,t));return n.audienceConditions||n.audienceIds},getVariationKeyFromId:function(e,t){return e.variationIdMap.hasOwnProperty(t)?e.variationIdMap[t].key:null},getVariationIdFromExperimentAndVariationKey:function(e,t,n){var r=e.experimentKeyMap[t];return r.variationKeyMap.hasOwnProperty(n)?r.variationKeyMap[n].id:null},getExperimentFromKey:function(e,t){if(e.experimentKeyMap.hasOwnProperty(t)){var n=e.experimentKeyMap[t];if(n)return n}throw new Error(o(u.EXPERIMENT_KEY_NOT_IN_DATAFILE,c,t))},getTrafficAllocation:function(e,t){var n=e.experimentKeyMap[t];if(r.isEmpty(n))throw new Error(o(u.INVALID_EXPERIMENT_KEY,c,t));return n.trafficAllocation},getExperimentFromId:function(e,t,n){if(e.experimentIdMap.hasOwnProperty(t)){var r=e.experimentIdMap[t];if(r)return r}return n.log(l.ERROR,o(u.INVALID_EXPERIMENT_ID,c,t)),null},getFeatureFromKey:function(e,t,n){if(e.featureKeyMap.hasOwnProperty(t)){var r=e.featureKeyMap[t];if(r)return r}return n.log(l.ERROR,o(u.FEATURE_NOT_IN_DATAFILE,c,t)),null},getVariableForFeature:function(e,t,n,r){var i=e.featureKeyMap[t];if(!i)return r.log(l.ERROR,o(u.FEATURE_NOT_IN_DATAFILE,c,t)),null;var a=i.variableKeyMap[n];return a||(r.log(l.ERROR,o(u.VARIABLE_KEY_NOT_IN_DATAFILE,c,n,t)),null)},getVariableValueForVariation:function(e,t,n,r){if(!t||!n)return null;if(!e.variationVariableUsageMap.hasOwnProperty(n.id))return r.log(l.ERROR,o(u.VARIATION_ID_NOT_IN_DATAFILE_NO_EXPERIMENT,c,n.id)),null;var i=e.variationVariableUsageMap[n.id][t.id];return i?i.value:null},getTypeCastValue:function(e,t,n){var r;switch(t){case d.BOOLEAN:"true"!==e&&"false"!==e?(n.log(l.ERROR,o(u.UNABLE_TO_CAST_VALUE,c,e,t)),r=null):r="true"===e;break;case d.INTEGER:r=parseInt(e,10),isNaN(r)&&(n.log(l.ERROR,o(u.UNABLE_TO_CAST_VALUE,c,e,t)),r=null);break;case d.DOUBLE:r=parseFloat(e),isNaN(r)&&(n.log(l.ERROR,o(u.UNABLE_TO_CAST_VALUE,c,e,t)),r=null);break;default:r=e}return r},getAudiencesById:function(e){return e.audiencesById},eventWithKeyExists:function(e,t){return e.eventKeyMap.hasOwnProperty(t)},isFeatureExperiment:function(e,t){return e.experimentFeatureMap.hasOwnProperty(t)},tryCreatingProjectConfig:function(t){return a.validateDatafile(t.datafile),!0===t.skipJSONValidation?t.logger.log(l.INFO,o(f.SKIPPING_JSON_VALIDATION,c)):t.jsonSchemaValidator&&(t.jsonSchemaValidator.validate(s,t.datafile),t.logger.log(l.INFO,o(f.VALID_DATAFILE,c))),e.exports.createProjectConfig(t.datafile)}}},ed708af38699b796fa10:function(e,t,n){var r=n("83aa2fe4775cf7337c0e"),i=n("4bfef6fdc48d634b8771"),o=n("f9a21f1b550208419753");e.exports=function(e){return r(e,o,i)}},eedc997fc37971b68c9e:function(e,t,n){(function(e){var r=n("5de5c65c2c431f821291"),i=t&&!t.nodeType&&t,o=i&&"object"==typeof e&&e&&!e.nodeType&&e,a=o&&o.exports===i&&r.process,s=function(){try{var e=o&&o.require&&o.require("util").types;return e||a&&a.binding&&a.binding("util")}catch(e){}}();e.exports=s}).call(this,n("f586cf5b9f4b7719b2c1")(e))},ef86c82e2fb9c58af3c0:function(e,t,n){var r=n("d3a850c4000d77bccc89");e.exports=function(e){return e===e&&!r(e)}},f0200b4beabe56dc845a:function(e,t,n){var r=n("4be2c15021f717a728f0")(n("18caba858d9ea0f67284"),"Map");e.exports=r},f067ac76b1240cb9aa03:function(e,t){var n,r,i,o,a,s,c,u,f={},l=[],d=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord/i;function p(e,t){for(var n in t)e[n]=t[n];return e}function h(e){var t=e.parentNode;t&&t.removeChild(e)}function b(e,t,n){var r,i=arguments,o={};for(r in t)"key"!==r&&"ref"!==r&&(o[r]=t[r]);if(arguments.length>3)for(n=[n],r=3;r2&&(t.children=l.slice.call(arguments,2)),n={},t)"key"!==r&&"ref"!==r&&(n[r]=t[r]);return _(e.type,n,t.key||e.key,t.ref||e.ref,null)},t.createContext=function(e){var t={},n={__c:"__cC"+u++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var r,i=this;return this.getChildContext||(r=[],this.getChildContext=function(){return t[n.__c]=i,t},this.shouldComponentUpdate=function(e){i.props.value!==e.value&&r.some((function(t){t.context=e.value,m(t)}))},this.sub=function(e){r.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){r.splice(r.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Consumer.contextType=n,n.Provider.__=n,n},t.toChildArray=T,t._e=L,t.options=n},f14de80411f54272a77c:function(e,t,n){var r=n("bfae026dad300e196930"),i=n("7b70b84aafc3be043372"),o=n("0fc56de7c1b97231ebe1"),a=n("d00fea9284c9a890699e"),s=n("f4652ce1ddc93da09269"),c=n("acf4ca991a0973bc409e"),u=n("31bb4f2f1a4f1df15bdf"),f=n("6f089bc9f5233e557a27"),l=n("43e9e529a54d89a08995"),d=n("b00719d067f820b8deb0"),p=n("ed708af38699b796fa10"),h=n("16a2663068191a21c134"),b=n("c93aa643470bbec2d243"),_=n("1bd3db6dd06f60a85824"),g=n("40b4dc0133c73e835b3f"),v=n("f2ef6f6e544aad97aa22"),y=n("72301e3cc725dd502232"),E=n("330dfc1a2ab8bc2e1ccf"),m=n("d3a850c4000d77bccc89"),I=n("9db4232de083de266b7e"),O=n("3478ed78d76c28060dce"),T={};T["[object Arguments]"]=T["[object Array]"]=T["[object ArrayBuffer]"]=T["[object DataView]"]=T["[object Boolean]"]=T["[object Date]"]=T["[object Float32Array]"]=T["[object Float64Array]"]=T["[object Int8Array]"]=T["[object Int16Array]"]=T["[object Int32Array]"]=T["[object Map]"]=T["[object Number]"]=T["[object Object]"]=T["[object RegExp]"]=T["[object Set]"]=T["[object String]"]=T["[object Symbol]"]=T["[object Uint8Array]"]=T["[object Uint8ClampedArray]"]=T["[object Uint16Array]"]=T["[object Uint32Array]"]=!0,T["[object Error]"]=T["[object Function]"]=T["[object WeakMap]"]=!1,e.exports=function e(t,n,N,R,A,S){var w,P=1&n,U=2&n,L=4&n;if(N&&(w=A?N(t,R,A,S):N(t)),void 0!==w)return w;if(!m(t))return t;var x=v(t);if(x){if(w=b(t),!P)return u(t,w)}else{var C=h(t),D="[object Function]"==C||"[object GeneratorFunction]"==C;if(y(t))return c(t,P);if("[object Object]"==C||"[object Arguments]"==C||D&&!A){if(w=U||D?{}:g(t),!P)return U?l(t,s(w,t)):f(t,a(w,t))}else{if(!T[C])return A?t:{};w=_(t,C,P)}}S||(S=new r);var j=S.get(t);if(j)return j;S.set(t,w),I(t)?t.forEach((function(r){w.add(e(r,n,N,r,t,S))})):E(t)&&t.forEach((function(r,i){w.set(i,e(r,n,N,i,t,S))}));var k=L?U?p:d:U?keysIn:O,V=x?void 0:k(t);return i(V||t,(function(r,i){V&&(r=t[i=r]),o(w,i,e(r,n,N,i,t,S))})),w}},f25b4772974b8669194e:function(e,t,n){var r=n("90d51c13c6e8468d0322"),i=n("df01904f40a18379887c"),o=n("adf63554636d9e903756");function a(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t-1&&e%1==0&&es)&&void 0===e.nsecs&&(b=0),b>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");s=h,c=b,i=d;var g=(1e4*(268435455&(h+=122192928e5))+b)%4294967296;f[u++]=g>>>24&255,f[u++]=g>>>16&255,f[u++]=g>>>8&255,f[u++]=255&g;var v=h/4294967296*1e4&268435455;f[u++]=v>>>8&255,f[u++]=255&v,f[u++]=v>>>24&15|16,f[u++]=v>>>16&255,f[u++]=d>>>8|128,f[u++]=255&d;for(var y=0;y<6;++y)f[u+y]=l[y];return t||a(f)}},ff287e4203ba67f8dff7:function(e,t,n){var r=n("f819b29f4efbf857daed");e.exports=function(e,t,n){var i=null==e?void 0:r(e,t);return void 0===i?n:i}}})}));